From 4c2d20b63ba84065c261d2a5265cc67fcb3e56ee Mon Sep 17 00:00:00 2001 From: Arthur Xavier Date: Fri, 1 May 2020 15:06:31 -0300 Subject: [PATCH] Add trivial instances of IsStyle and IsStyleProperty (#2) --- src/React/Basic/Emotion.purs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/React/Basic/Emotion.purs b/src/React/Basic/Emotion.purs index 1adef61..85534e9 100644 --- a/src/React/Basic/Emotion.purs +++ b/src/React/Basic/Emotion.purs @@ -55,6 +55,9 @@ foreign import emptyStyle :: Style class IsStyle a where style :: a -> Style +instance isStyleStyle :: IsStyle Style where + style = identity + data StyleProperty instance semigroupStyleProperty :: Semigroup StyleProperty where @@ -78,6 +81,9 @@ foreign import emptyStyleProperty :: StyleProperty class IsStyleProperty a where prop :: a -> StyleProperty +instance isStylePropertyStyleProperty :: IsStyleProperty StyleProperty where + prop = identity + -- | Create a `JSX` node from a `ReactComponent`, by providing the props. -- | -- | This function is identical to `React.Basic.element` plus Emotion's