Current section
Files
Jump to
Current section
Files
src/lustre/ui/group.gleam
// IMPORTS ---------------------------------------------------------------------
import lustre/attribute.{type Attribute, attribute}
import lustre/element.{type Element}
import lustre/element/html
// ELEMENTS --------------------------------------------------------------------
///
pub fn group(
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-group"), ..attributes], children)
}