Skip to content

Commit 0a325dd

Browse files
committed
doc: update README
1 parent 68358e4 commit 0a325dd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,23 @@ They are compiled as CSS classes which then can be controlled from JS via
6464

6565
<Label variant={{emphasis: true}} /> // sets both classes with `color` and `font-weight`
6666

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+
6784
## TODO
6885

6986
* [ ] Support adding PostCSS transform to build pipeline (think autoprefixer).

0 commit comments

Comments
 (0)