File tree 1 file changed +1
-27
lines changed
1 file changed +1
-27
lines changed Original file line number Diff line number Diff line change @@ -109,33 +109,7 @@ const Foo = ReactCSSOM.inject((props) => (
109
109
110
110
### Adapting based on props
111
111
112
- If you want to set styles based on props, you can do it in 3 ways:
113
-
114
- - Using a style tag directly into the component:
115
- ``` js
116
- export default class Button extends React .Component {
117
-
118
- static displayName = ' Button' ;
119
-
120
- render () {
121
- return (
122
- < div>
123
- < style>
124
- {`
125
- .⚛Button > button {
126
- background-color: ${ this .props .primary ? ' blue' : ' black' }
127
- }
128
- ` }
129
- < / style>
130
- < button>
131
- Click me
132
- < / button>
133
- < / div>
134
- )
135
- }
136
- }
137
- ```
138
-
112
+ If you want to set styles based on props, you can do it in 2 ways:
139
113
140
114
- Setting a specific class, maybe using css-modules, as we can see here:
141
115
``` js
You can’t perform that action at this time.
0 commit comments