Skip to content

Commit 3257da0

Browse files
committed
Revert "Array JSX"
This reverts commit c7ba206.
1 parent c7ba206 commit 3257da0

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

docs/Examples/Tooltip.example.purs

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Lumi.Components.Column (column_)
99
import Lumi.Components.Link as Link
1010
import Lumi.Components.Row (row_)
1111
import Lumi.Components.Text (body_)
12+
import Lumi.Components.Text as T
1213
import Lumi.Components.Example (example)
1314
import Lumi.Components.Tooltip (tooltip)
1415
import React.Basic (JSX)
@@ -22,7 +23,7 @@ docs =
2223
$ tooltip
2324
{ variant: "basic"
2425
, style: R.css {}
25-
, text: [ R.text "Lorem ipsum" ]
26+
, text: R.text "Lorem ipsum"
2627
, content: body_ "Basic example"
2728
, size: toNullable Nothing
2829
}
@@ -31,7 +32,7 @@ docs =
3132
$ tooltip
3233
{ variant: "top"
3334
, style: R.css {}
34-
, text: [ R.text "Lorem ipsum" ]
35+
, text: R.text "Lorem ipsum"
3536
, content: body_ "Top example"
3637
, size: toNullable Nothing
3738
}
@@ -40,7 +41,7 @@ docs =
4041
$ tooltip
4142
{ variant: "bottom"
4243
, style: R.css {}
43-
, text: [ R.text "Lorem ipsum" ]
44+
, text: R.text "Lorem ipsum"
4445
, content: body_ "Bottom example"
4546
, size: toNullable Nothing
4647
}
@@ -49,7 +50,7 @@ docs =
4950
$ tooltip
5051
{ variant: "left"
5152
, style: R.css {}
52-
, text: [ R.text "Lorem ipsum" ]
53+
, text: R.text "Lorem ipsum"
5354
, content: body_ "Left example"
5455
, size: toNullable Nothing
5556
}
@@ -60,7 +61,7 @@ docs =
6061
, tooltip
6162
{ variant: "top"
6263
, style: R.css { padding: "0 2px", textDecoration: "underline" }
63-
, text: [ R.text "Lorem ipsum" ]
64+
, text: R.text "Lorem ipsum"
6465
, content: body_ "here"
6566
, size: toNullable Nothing
6667
}
@@ -73,7 +74,7 @@ docs =
7374
, tooltip
7475
{ variant: "top"
7576
, style: R.css { padding: "0 2px", textDecoration: "underline" }
76-
, 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." ]
77+
, 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."
7778
, content: body_ "here"
7879
, size: toNullable $ Just $ Large
7980
}
@@ -87,14 +88,18 @@ docs =
8788
{ variant: "top"
8889
, style: R.css { padding: "0 2px", textDecoration: "underline" }
8990
, text:
90-
[ R.text "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis auctor libero non libero consequat, at iaculis diam venenatis. Donec nec porttitor tellus "
91-
, Link.link Link.defaults
92-
{ href = URL "#/link"
93-
, text = R.text "click here"
94-
, target = Just "_blank"
95-
}
96-
, R.text "."
97-
]
91+
T.text T.body
92+
{ style = R.css {}
93+
, children =
94+
[ R.text "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis auctor libero non libero consequat, at iaculis diam venenatis. Donec nec porttitor tellus "
95+
, Link.link Link.defaults
96+
{ href = URL "#/link"
97+
, text = R.text "click here"
98+
, target = Just "_blank"
99+
}
100+
, R.text "."
101+
]
102+
}
98103
, content: body_ "here"
99104
, size: toNullable $ Just $ Large
100105
}

src/Lumi/Components/Tooltip.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import React.Basic.DOM (CSS, unsafeCreateDOMComponent)
1414
type TooltipProps =
1515
{ variant :: String
1616
, style :: CSS
17-
, text :: Array JSX
17+
, text :: JSX
1818
, content :: JSX
1919
, size :: Nullable Size
2020
}
@@ -35,7 +35,7 @@ tooltip = makeStateless component render
3535
, "data-variant": props.variant
3636
, children:
3737
[ lumiTooltipTextElement
38-
{ children: props.text }
38+
{ children: [ props.text ] }
3939
, props.content
4040
]
4141
}

0 commit comments

Comments
 (0)