Skip to content

Commit

Permalink
Fix warning of constraints in ffi
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Vincent Liwanag authored and Jan Vincent Liwanag committed Mar 31, 2021
1 parent d53b870 commit 151fcf2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/React/Basic/Emotion.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ exports.elementKeyed_ = (component, props) =>

exports.global = Emotion.Global;

exports.css = _homogeneousDict => Emotion.css;
exports._css = Emotion.css;

exports.important = prop => typeof prop === "string" ? prop + " !important" : prop;

exports.keyframes = _homogeneousDict => Emotion.keyframes;
exports._keyframes = Emotion.keyframes;
10 changes: 8 additions & 2 deletions src/React/Basic/Emotion.purs
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,17 @@ foreign import elementKeyed_ ::

foreign import global :: ReactComponent { styles :: Style }

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

foreign import _css :: forall r. { | r } -> Style

foreign import important :: StyleProperty -> StyleProperty

foreign import keyframes :: forall r. Homogeneous r Style => { | r } -> StyleProperty
keyframes :: forall r. Homogeneous r Style => { | r } -> StyleProperty
keyframes = _keyframes

foreign import _keyframes :: forall r. { | r } -> StyleProperty

nested :: Style -> StyleProperty
nested = unsafeCoerce
Expand Down

0 comments on commit 151fcf2

Please sign in to comment.