Skip to content

Commit bd79aba

Browse files
committed
Add combinator for making a property !important
1 parent b9a9284 commit bd79aba

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/React/Basic/Emotion.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ exports.elementKeyed_ = (component, props) =>
3434
exports.global = Emotion.Global;
3535

3636
exports.css = _homogeneousDict => Emotion.css;
37+
38+
exports.important = prop => typeof prop === "string" ? prop + " !important" : prop;

src/React/Basic/Emotion.purs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module React.Basic.Emotion
77
, prop
88
, element
99
, css
10+
, important
1011
, nested
1112
, merge
1213
, str
@@ -119,6 +120,8 @@ foreign import global :: ReactComponent { styles :: Style }
119120

120121
foreign import css :: forall r. Homogeneous r StyleProperty => { | r } -> Style
121122

123+
foreign import important :: StyleProperty -> StyleProperty
124+
122125
nested :: Style -> StyleProperty
123126
nested = unsafeCoerce
124127

0 commit comments

Comments
 (0)