-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathSpacing.example.purs
50 lines (47 loc) · 1.36 KB
/
Spacing.example.purs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
module Lumi.Components.Examples.Spacing where
import Prelude
import Color (cssStringHSLA)
import Lumi.Components.Color (colors)
import Lumi.Components.Column (column_)
import Lumi.Components.Example (example)
import Lumi.Components.Row (row)
import Lumi.Components.Spacing (Space(..), hspace, vspace)
import Lumi.Components.Text (body_)
import React.Basic.Classic (JSX)
import React.Basic.DOM as R
docs :: JSX
docs =
column_
[ spacingExample "4px" S4
, spacingExample "8px" S8
, spacingExample "12px" S12
, spacingExample "16px" S16
, spacingExample "24px" S24
, spacingExample "32px" S32
, spacingExample "48px" S48
, spacingExample "56px" S56
, spacingExample "64px" S64
, spacingExample "72px" S72
, spacingExample "80px" S80
, spacingExample "88px" S88
, spacingExample "96px" S96
, spacingExample "104px" S104
, spacingExample "112px" S112
]
where
spacingExample text size =
example $
row
{ style: R.css { alignItems: "center" }
, children:
[ body_ text
, hspace S12
, row
{ style: R.css { backgroundColor: cssStringHSLA colors.black3 }
, children:
[ R.div_ [ vspace S64 ]
, hspace size
]
}
]
}