You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-35Lines changed: 46 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,50 +89,43 @@ Under the hood, `classier-react` assumes any unknown props are declared as modif
89
89
90
90
- Sentence-casing is preserved but not added
91
91
92
-
## Passing down styles
93
-
94
-
`<Comp />` only injects the props it merges, it can't make sure they are rendered. If you're wrapping or writing a component, it's a good idea to pass any props you don't use onward to what is rendered.
Your elements can then be used in your other components
129
-
```jsx
130
-
// feature/component.jsx
131
-
importBlockfrom'./block'
132
115
133
116
...
134
117
135
-
<Block.Element fontSize='md' {...props} />
118
+
<Block.Element fontSize="md" {...props} />
119
+
```
120
+
121
+
## Passing down styles
122
+
123
+
`<Comp />` only injects the props it merges, it can't make sure they are rendered. If you're wrapping or writing a component, it's a good idea to pass the `style` and `className` props onward to what is rendered.
0 commit comments