-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
prose.gleam
40 lines (32 loc) · 963 Bytes
/
prose.gleam
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
// IMPORTS ---------------------------------------------------------------------
import lustre/attribute.{type Attribute, attribute}
import lustre/element.{type Element}
import lustre/element/html
// ELEMENTS --------------------------------------------------------------------
///
///
pub fn prose(
attributes: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
of(html.div, attributes, children)
}
///
///
pub fn of(
element: fn(List(Attribute(msg)), List(Element(msg))) -> Element(msg),
attributes: List(Attribute(msg)),
children: List(Element(msg)),
) -> Element(msg) {
element([attribute.class("lustre-ui-prose"), ..attributes], children)
}
// ATTRIBUTES ------------------------------------------------------------------
pub fn narrow() -> Attribute(msg) {
attribute.class("narrow")
}
pub fn wide() -> Attribute(msg) {
attribute.class("wide")
}
pub fn full() -> Attribute(msg) {
attribute.class("full")
}