Fusuma

Components / Components

alert

A message in a card with a bar of its tone down the side: a title and a line under it.

Try it

This is the Components page of the gallery, running in your browser: alert is on it, and it is the real widget. Press Run, then use it.

Live: Components, where alert is usedOpen full size

Also on this pagebannersnackbarbreadcrumbsstepsgaugetile

A message in a card with a bar of its tone down the side: a title and a line under it.

Signature

pub fn alert<'a, M: Clone + 'a>( tone: Tone, title: &'a str, body: &'a str, ) -> impl View<M> + 'a

Example

use fusuma::{Tone, alert};
let view = alert(Tone::Info, "Update available", "Version 2 is ready to install.");
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.texts(), ["Update available", "Version 2 is ready to install."]);

All components · Source