sketch/lustre/element
Functions
pub fn dynamic(
tag tag: String,
attributes attributes: List(Attribute(a)),
children children: List(Element(a)),
id id: String,
styles styles: List(Style(b, c)),
) -> Element(a)
Equivalent to
fn component() {
let class =
sketch.dynamic(id, styles)
|> sketch.to_lustre
element.element(tag, [class, ..attributes], children)
}
pub fn element(
tag tag: String,
attributes attributes: List(Attribute(a)),
children children: List(Element(a)),
styles styles: List(Style(b, c)),
) -> Element(a)
Equivalent to
fn component() {
let class =
sketch.class(styles)
|> sketch.to_lustre
element.element(tag, [class, ..attributes], children)
}
pub fn memo(
tag tag: String,
attributes attributes: List(Attribute(a)),
children children: List(Element(a)),
styles styles: List(Style(b, c)),
) -> Element(a)
Equivalent to
fn component() {
let class =
sketch.class(styles)
|> sketch.memo
|> sketch.to_lustre
element.element(tag, [class, ..attributes], children)
}
pub fn memo_dynamic(
tag tag: String,
attributes attributes: List(Attribute(a)),
children children: List(Element(a)),
id id: String,
styles styles: List(Style(b, c)),
) -> Element(a)
Equivalent to
fn component() {
let class =
sketch.dynamic(id, styles)
|> sketch.memo
|> sketch.to_lustre
element.element(tag, [class, ..attributes], children)
}