thaw/demo/src/pages/radio/mod.rs

36 lines
877 B
Rust
Raw Normal View History

2023-10-19 22:31:14 +08:00
use crate::components::{Demo, DemoCode};
use leptos::*;
2023-11-05 16:03:58 +08:00
use thaw::*;
2023-10-19 22:31:14 +08:00
use prisms::highlight_str;
#[component]
pub fn RadioPage() -> impl IntoView {
let checked = create_rw_signal(false);
view! {
<div style="width: 896px; margin: 0 auto;">
<h1>"Radio"</h1>
<Demo>
<Radio value=checked>"Click"</Radio>
<DemoCode
slot
html=highlight_str!(
r#"
let value = create_rw_signal(false);
view! {
<Radio value>
"Click"
</Radio>
}
"#,
"rust"
)
>
""
</DemoCode>
</Demo>
</div>
}
}