From 0b797c658f4969780fcd8c861eb2aac687d1d01e Mon Sep 17 00:00:00 2001 From: Arthur Xavier Date: Thu, 30 Apr 2020 09:52:20 -0300 Subject: [PATCH] Add trivial instances of IsStyle and IsStyleProperty --- 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