Skip to content

Commit

Permalink
Add trivial instances of IsStyle and IsStyleProperty (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurxavierx authored May 1, 2020
1 parent 012d265 commit 4c2d20b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/React/Basic/Emotion.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 4c2d20b

Please sign in to comment.