We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68358e4 commit 0a325ddCopy full SHA for 0a325dd
README.md
@@ -64,6 +64,23 @@ They are compiled as CSS classes which then can be controlled from JS via
64
65
<Label variant={{emphasis: true}} /> // sets both classes with `color` and `font-weight`
66
67
+## Prop variants
68
+
69
+You can define variants which are based on some JavaScript expression against
70
+props:
71
72
+ Label {
73
+ color: red;
74
+ }
75
76
+ Label:prop(mode == "emphasis") {
77
+ font-weight: bold;
78
79
80
+They are compiled as CSS classes which then can be controlled from JS:
81
82
+ <Label mode="emphasis" /> // sets both classes with `color` and `font-weight`
83
84
## TODO
85
86
* [ ] Support adding PostCSS transform to build pipeline (think autoprefixer).
0 commit comments