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).