2023-10-11 23:02:04 +08:00
|
|
|
use crate::components::{Demo, DemoCode};
|
|
|
|
use leptos::*;
|
|
|
|
use prisms::highlight_str;
|
2023-11-16 12:33:04 +08:00
|
|
|
use thaw::*;
|
2023-10-11 23:02:04 +08:00
|
|
|
|
|
|
|
#[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>
|
2023-11-24 10:04:54 +08:00
|
|
|
<DemoCode slot>
|
|
|
|
|
|
|
|
{highlight_str!(
|
2023-10-11 23:02:04 +08:00
|
|
|
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"
|
2023-11-24 10:04:54 +08:00
|
|
|
)}
|
2023-10-11 23:02:04 +08:00
|
|
|
|
|
|
|
</DemoCode>
|
|
|
|
</Demo>
|
2023-11-13 22:03:44 +08:00
|
|
|
<h3>"Alert Props"</h3>
|
|
|
|
<Table single_column=true>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>"Name"</th>
|
|
|
|
<th>"Type"</th>
|
|
|
|
<th>"Default"</th>
|
|
|
|
<th>"Description"</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2023-12-11 13:21:47 +01:00
|
|
|
<tr>
|
|
|
|
<td>"class"</td>
|
|
|
|
<td>"MaybeSignal<String>"</td>
|
|
|
|
<td>"Default::default()"</td>
|
|
|
|
<td>"Additional classes for the alert element."</td>
|
|
|
|
</tr>
|
2023-11-13 22:03:44 +08:00
|
|
|
<tr>
|
|
|
|
<td>"title"</td>
|
|
|
|
<td>"MaybeSignal<String>"</td>
|
2023-11-24 10:04:54 +08:00
|
|
|
<td>"Default::default()"</td>
|
2023-11-13 22:03:44 +08:00
|
|
|
<td>"Title of the alert."</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>"variant"</td>
|
|
|
|
<td>"AlertVariant"</td>
|
|
|
|
<td></td>
|
|
|
|
<td>"Alert variant."</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>"children"</td>
|
|
|
|
<td>"Children"</td>
|
|
|
|
<td></td>
|
|
|
|
<td>"The content of the alert."</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</Table>
|
2023-10-11 23:02:04 +08:00
|
|
|
</div>
|
|
|
|
}
|
|
|
|
}
|