Module alerts

Module alerts 

Source
Expand description

Bootstrap alert components.

Provides type-safe Bootstrap alerts matching the Bootstrap alerts documentation.

§Example

use ironhtml_bootstrap::{alerts::*, Color};

// Simple alert
let warning = alert(Color::Warning, "This is a warning!");
assert!(warning.render().contains(r#"class="alert alert-warning"#));
assert!(warning.render().contains(r#"role="alert"#));

// Dismissible alert
let dismissible = alert_dismissible(Color::Danger, "Error occurred!");
assert!(dismissible.render().contains("alert-dismissible"));
assert!(dismissible.render().contains("btn-close"));

Functions§

alert
Create a simple Bootstrap alert.
alert_dismissible
Create a dismissible Bootstrap alert.
alert_with
Create an alert with custom content.
alert_with_heading
Create an alert with heading (from Bootstrap docs).