From 151fcf2d8692c15f551c66735bb1c1fabed51e9c Mon Sep 17 00:00:00 2001 From: Jan Vincent Liwanag Date: Wed, 31 Mar 2021 22:26:22 +0800 Subject: [PATCH] Fix warning of constraints in ffi --- src/React/Basic/Emotion.js | 4 ++-- src/React/Basic/Emotion.purs | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/React/Basic/Emotion.js b/src/React/Basic/Emotion.js index 1c4c3b5..73382b6 100644 --- a/src/React/Basic/Emotion.js +++ b/src/React/Basic/Emotion.js @@ -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; diff --git a/src/React/Basic/Emotion.purs b/src/React/Basic/Emotion.purs index 1ba7484..8ee5255 100644 --- a/src/React/Basic/Emotion.purs +++ b/src/React/Basic/Emotion.purs @@ -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