2023-10-11 23:02:04 +08:00
|
|
|
use crate::components::{Demo, DemoCode};
|
|
|
|
use leptos::*;
|
|
|
|
use melt_ui::*;
|
|
|
|
use prisms::highlight_str;
|
|
|
|
|
|
|
|
#[component]
|
|
|
|
pub fn AlertPage() -> impl IntoView {
|
|
|
|
view! {
|
|
|
|
<div style="width: 896px; margin: 0 auto;">
|
|
|
|
<h1>"Alert"</h1>
|
|
|
|
<Demo>
|
|
|
|
<Space vertical=true>
|
2023-10-16 21:15:43 +08:00
|
|
|
<Alert variant=AlertVariant::Success title="title">
|
2023-10-12 23:25:10 +08:00
|
|
|
"success"
|
|
|
|
</Alert>
|
2023-10-16 21:15:43 +08:00
|
|
|
<Alert variant=AlertVariant::Warning title="title">
|
2023-10-12 23:25:10 +08:00
|
|
|
"warning"
|
|
|
|
</Alert>
|
2023-10-16 21:15:43 +08:00
|
|
|
<Alert variant=AlertVariant::Error title="title">
|
2023-10-12 23:25:10 +08:00
|
|
|
"error"
|
|
|
|
</Alert>
|
2023-10-11 23:02:04 +08:00
|
|
|
</Space>
|
|
|
|
<DemoCode
|
|
|
|
slot
|
|
|
|
html=highlight_str!(
|
|
|
|
r#"
|
2023-10-16 21:15:43 +08:00
|
|
|
<Alert variant=AlertVariant::Success title="title">"success"</Alert>
|
|
|
|
<Alert variant=AlertVariant::Warning title="title">"warning"</Alert>
|
|
|
|
<Alert variant=AlertVariant::Error title="title">"error"</Alert>
|
2023-10-11 23:02:04 +08:00
|
|
|
"#,
|
|
|
|
"rust"
|
|
|
|
)
|
|
|
|
>
|
|
|
|
|
|
|
|
""
|
|
|
|
</DemoCode>
|
|
|
|
</Demo>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|