gbr/ui/alert

Gleam UI super alert elements.

Types

UI super alert element.

  • el: Element info
  • info: Alert description info
  • status: Alert status “info”, “error”…
  • open: If alert is open or not.
pub opaque type UIAlert

Alert render element

in: Alert info

pub opaque type UIAlertRender(a)

Values

pub fn at(in: UIAlert) -> UIAlertRender(a)

New alert render element.

  • in: Alert info
pub fn class(in: UIAlert, class: String) -> UIAlert

Set alert main class style

in: Alert info class: Alert class

pub fn class_content(in: UIAlert, class: String) -> UIAlert

Set alert content class style

in: Alert info class: Alert content class

pub fn class_desc(in: UIAlert, class: String) -> UIAlert

Set alert description class style

in: Alert description info class: Alert description class

pub fn class_icon(in: UIAlert, class: String) -> UIAlert

Set alert icon class style

in: Alert info class: Alert icon class to set

pub fn class_status_error(
  in: UIAlert,
  class: String,
  class_icon: String,
) -> UIAlert

Set alert status class style

  • in: Alert info
  • class: Alert status class style
  • class_icon: Alert icon class style, only if icon_show = True
pub fn class_status_info(
  in: UIAlert,
  class: String,
  class_icon: String,
) -> UIAlert

Set alert status class style

  • in: Alert info
  • class: Alert status class style
  • class_icon: Alert icon class style, only if icon_show = True
pub fn class_status_success(
  in: UIAlert,
  class: String,
  class_icon: String,
) -> UIAlert

Set alert status class style

  • in: Alert info
  • class: Alert status class style
  • class_icon: Alert icon class style, only if icon_show = True
pub fn class_status_warn(
  in: UIAlert,
  class: String,
  class_icon: String,
) -> UIAlert

Set alert status class style

  • in: Alert info
  • class: Alert status class style
  • class_icon: Alert icon class style, only if icon_show = True
pub fn class_title(in: UIAlert, class: String) -> UIAlert

Set alert title class style

in: Alert title info class: Alert title class

pub fn classes_status_error(
  in: UIAlert,
  classes: List(#(String, Bool)),
  classes_icon: List(#(String, Bool)),
) -> UIAlert

Set alert status classes switch

  • in: Alert info
  • classes: Alert status classes
  • classes_icon: Alert icon class style, only if icon_show = True
pub fn classes_status_info(
  in: UIAlert,
  classes: List(#(String, Bool)),
  classes_icon: List(#(String, Bool)),
) -> UIAlert

Set alert status classes switch

  • in: Alert info
  • classes: Alert status classes
  • classes_icon: Alert icon class style, only if icon_show = True
pub fn classes_status_success(
  in: UIAlert,
  classes: List(#(String, Bool)),
  classes_icon: List(#(String, Bool)),
) -> UIAlert

Set alert status classes switch

  • in: Alert info
  • classes: Alert status classes
  • classes_icon: Alert icon class style, only if icon_show = True
pub fn classes_status_warn(
  in: UIAlert,
  classes: List(#(String, Bool)),
  classes_icon: List(#(String, Bool)),
) -> UIAlert

Set alert status classes switch style

  • in: Alert info
  • classes: Alert status classes
  • classes_icon: Alert icon class style, only if icon_show = True
pub fn desc(in: UIAlert, desc: String) -> UIAlert

Replace alert title

pub fn error(in: UIAlert) -> UIAlert

Set error behavior to alert

pub fn info(in: UIAlert) -> UIAlert

Set info behavior to alert

pub fn inner(
  in: UIAlertRender(a),
  inner: List(element.Element(a)),
) -> UIAlertRender(a)

Replace alert inner elements

pub fn new(title: String, desc: String) -> UIAlert

New alert super element pass title and description.

  • title: Alert title
  • desc: Alert description
pub fn open(in: UIAlert, open: Bool) -> UIAlert

Set open alert element.

pub fn render(at: UIAlertRender(a)) -> element.Element(a)

Set attribute el.classes by status

Render super alert element to lustre/element/html.{div}.

pub fn success(in: UIAlert) -> UIAlert

Set success behavior to alert

pub fn title(in: UIAlert, title: String) -> UIAlert

Replace alert title

pub fn warning(in: UIAlert) -> UIAlert

Set warning behavior to alert

Search Document