Skip to content

Commit

Permalink
Remove int, num deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Vincent Liwanag authored and Jan Vincent Liwanag committed Apr 3, 2021
1 parent f977946 commit e3ccfd7
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/React/Basic/Emotion.purs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ import Data.Number.Format (toString) as Number
import Data.String as String
import Foreign as F
import Foreign.Object (Object, fromHomogeneous)
import Prim.TypeError (class Warn, Text)
import React.Basic (JSX, ReactComponent)
import Type.Row.Homogeneous (class Homogeneous)
import Unsafe.Coerce (unsafeCoerce)
Expand Down Expand Up @@ -199,16 +198,18 @@ merge = unsafeCoerce
str :: String -> StyleProperty
str = unsafeCoerce

int
:: Warn (Text "`int` is deprecated and may be removed in future versions. Prefer `str` or one of the unit combinators like `px` or `em` instead.")
=> Int
-> StyleProperty
-- | Create a unitless `Int` property.
-- |
-- | Wherever units may be specified, use unit combinators like `px`
-- | or `em` instead.
int :: Int -> StyleProperty
int = unsafeCoerce

num
:: Warn (Text "`num` is deprecated and may be removed in future versions. Prefer `str` or one of the unit combinators like `px` or `em` instead.")
=> Number
-> StyleProperty
-- | Create a unitless `Number` property.
-- |
-- | Wherever units may be specified, use unit combinators like `px`
-- | or `em` instead.
num :: Number -> StyleProperty
num = unsafeCoerce

fallbacks :: Array StyleProperty -> StyleProperty
Expand Down

0 comments on commit e3ccfd7

Please sign in to comment.