Skip to content

Commit 4c2d20b

Browse files
Add trivial instances of IsStyle and IsStyleProperty (#2)
1 parent 012d265 commit 4c2d20b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/React/Basic/Emotion.purs

+6
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ foreign import emptyStyle :: Style
5555
class IsStyle a where
5656
style :: a -> Style
5757

58+
instance isStyleStyle :: IsStyle Style where
59+
style = identity
60+
5861
data StyleProperty
5962

6063
instance semigroupStyleProperty :: Semigroup StyleProperty where
@@ -78,6 +81,9 @@ foreign import emptyStyleProperty :: StyleProperty
7881
class IsStyleProperty a where
7982
prop :: a -> StyleProperty
8083

84+
instance isStylePropertyStyleProperty :: IsStyleProperty StyleProperty where
85+
prop = identity
86+
8187
-- | Create a `JSX` node from a `ReactComponent`, by providing the props.
8288
-- |
8389
-- | This function is identical to `React.Basic.element` plus Emotion's

0 commit comments

Comments
 (0)