-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathTooltip.example.purs
108 lines (99 loc) · 3.48 KB
/
Tooltip.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
module Lumi.Components.Examples.Tooltip where
import Prelude
import Data.Maybe (Maybe(..))
import Data.Nullable (toNullable)
import Lumi.Components.Size (Size(..))
import Lumi.Components.Column (column_)
import Lumi.Components.Link as Link
import Lumi.Components.Row (row_)
import Lumi.Components.Text (body_)
import Lumi.Components.Text as T
import Lumi.Components.Example (example)
import Lumi.Components.Tooltip (tooltip)
import React.Basic.Classic (JSX)
import React.Basic.DOM as R
import Web.HTML.History (URL(..))
docs :: JSX
docs =
column_
[ example
$ tooltip
{ variant: "basic"
, style: R.css {}
, text: R.text "Lorem ipsum"
, content: body_ "Basic example"
, size: toNullable Nothing
}
, example
$ tooltip
{ variant: "top"
, style: R.css {}
, text: R.text "Lorem ipsum"
, content: body_ "Top example"
, size: toNullable Nothing
}
, example
$ tooltip
{ variant: "bottom"
, style: R.css {}
, text: R.text "Lorem ipsum"
, content: body_ "Bottom example"
, size: toNullable Nothing
}
, example
$ tooltip
{ variant: "left"
, style: R.css {}
, text: R.text "Lorem ipsum"
, content: body_ "Left example"
, size: toNullable Nothing
}
, example
$ row_
[ body_ "Hello, world see"
, tooltip
{ variant: "top"
, style: R.css { padding: "0 2px", textDecoration: "underline" }
, text: R.text "Lorem ipsum"
, content: body_ "here"
, size: toNullable Nothing
}
, body_ "for more."
]
, example
$ row_
[ body_ "Hello, world see"
, tooltip
{ variant: "top"
, style: R.css { padding: "0 2px", textDecoration: "underline" }
, text: R.text "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis auctor libero non libero consequat, at iaculis diam venenatis. Donec nec porttitor tellus."
, content: body_ "here"
, size: toNullable $ Just $ Large
}
, body_ "for more."
]
, example
$ row_
[ body_ "Hello, world see"
, tooltip
{ variant: "top"
, style: R.css { padding: "0 2px", textDecoration: "underline" }
, text:
T.text T.body
{ style = R.css {}
, children =
[ R.text "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis auctor libero non libero consequat, at iaculis diam venenatis. Donec nec porttitor tellus "
, Link.link Link.defaults
{ href = URL "#/link"
, text = R.text "click here"
, target = Just "_blank"
}
, R.text "."
]
}
, content: body_ "here"
, size: toNullable $ Just $ Large
}
, body_ "for more (includes link in tooltip)."
]
]