use std::collections::HashSet;
use crate::components::{Demo, DemoCode};
use leptos::*;
use prisms::highlight_str;
use thaw::*;
#[component]
pub fn CheckboxPage() -> impl IntoView {
let checked = create_rw_signal(false);
let value = create_rw_signal(HashSet::new());
view! {
"Checkbox"
"Click"
"Click"
}
"#,
"rust"
)
>
""
"group"
"value: " {move || format!("{:?}", value.get())}
}
"#,
"rust"
)
>
""
"Checkbox Props"
"Name" |
"Type" |
"Default" |
"Description" |
"value" |
"RwSignal" |
"false" |
"Whether the checkbox is being checked." |
"children" |
"Children" |
|
"Checkbox's content." |
"CheckboxGroup Props"
"Name" |
"Type" |
"Default" |
"Description" |
"value" |
"RwSignal>," |
"false" |
"Sets the value of the checkbox group." |
"children" |
"Children" |
|
"CheckboxGroup's content." |
"CheckboxItem Props"
"Name" |
"Type" |
"Default" |
"Description" |
"key" |
"String" |
|
"The key of the checkbox to be used in a checkbox group." |
"label" |
"Option" |
"None" |
"Checkbox's label." |
}
}