Skip to content

Commit b48850c

Browse files
committed
Code review
1 parent 4fb0dec commit b48850c

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"purescript-profunctor-lenses": ">=4.0.0 <7.0.0",
3131
"purescript-random": "^4.0.0",
3232
"purescript-react-basic": "^13.0.0",
33-
"purescript-react-basic-emotion": "^4.0.0",
33+
"purescript-react-basic-emotion": "^4.2.1",
3434
"purescript-react-basic-hooks": "^4.1.1",
3535
"purescript-react-dnd-basic": "^6.1.4",
3636
"purescript-record": ">= 1.0.0 < 3.0.0",

src/Lumi/Components2/Text.purs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ text =
7777
defaultTextStyle :: LumiTheme -> Maybe TextType -> Style
7878
defaultTextStyle theme ty =
7979
S.css
80-
{ fontSize: maybe S.inherit (px <<< textFontSize theme <<< textTheme) ty
81-
, lineHeight: maybe S.inherit (px <<< textLineHeight theme <<< textTheme) ty
80+
{ fontSize: maybe S.inherit (S.px <<< textFontSize theme <<< textTheme) ty
81+
, lineHeight: maybe S.inherit (S.px <<< textLineHeight theme <<< textTheme) ty
8282
, whiteSpace: S.str "pre-wrap"
8383
, margin: S.str "0"
8484
, padding: S.str "0"
@@ -261,10 +261,7 @@ textStyle :: (forall a. TextMap a -> a) -> StyleModifier
261261
textStyle selector =
262262
S.style \theme ->
263263
S.css
264-
{ fontSize: px $ textFontSize theme selector
265-
, lineHeight: px $ textLineHeight theme selector
266-
, marginBottom: px $ textMargin theme selector
264+
{ fontSize: S.px $ textFontSize theme selector
265+
, lineHeight: S.px $ textLineHeight theme selector
266+
, marginBottom: S.px $ textMargin theme selector
267267
}
268-
269-
px :: Int -> StyleProperty
270-
px i = S.str $ show i <> "px"

src/Lumi/Styles/Responsive.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Lumi.Styles.Responsive where
22

33
import Prelude
44

5-
import Lumi.Styles (Style, StyleModifier, css, nested, style)
5+
import Lumi.Styles (Style, StyleModifier, css, nested, style, toCSS)
66

77
-- | Create a style modifier that, only in a desktop-sized screen, applies the
88
-- | styles accumulated in the modifier passed in as argument.
@@ -14,7 +14,7 @@ onDesktop :: StyleModifier -> StyleModifier
1414
onDesktop m =
1515
style \theme ->
1616
desktopQuery
17-
$ (m identity { className: "", css: mempty }).css
17+
$ toCSS m
1818
$ theme
1919

2020
-- | Guard a style so that it's only applied in a desktop resolution.

0 commit comments

Comments
 (0)