diff --git a/demo/src/pages/button/mod.rs b/demo/src/pages/button/mod.rs index 63bb7b8..ee3077c 100644 --- a/demo/src/pages/button/mod.rs +++ b/demo/src/pages/button/mod.rs @@ -193,7 +193,7 @@ pub fn ButtonPage() -> impl IntoView { } #[component] -pub fn LoadingButton() -> impl IntoView { +fn LoadingButton() -> impl IntoView { let loading = create_rw_signal(false); let on_click = move |_| { loading.set(true); diff --git a/demo/src/pages/input/mod.rs b/demo/src/pages/input/mod.rs index 7bf408f..83cffaf 100644 --- a/demo/src/pages/input/mod.rs +++ b/demo/src/pages/input/mod.rs @@ -1,7 +1,7 @@ use crate::components::{Demo, DemoCode}; use leptos::*; -use thaw::*; use prisms::highlight_str; +use thaw::*; #[component] pub fn InputPage() -> impl IntoView { @@ -43,6 +43,72 @@ pub fn InputPage() -> impl IntoView { "" +

"Input Props"

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
"Name""Type""Default""Description"
"value""RwSignal"r#""""#"Set the input value"
"variant""MaybeSignal""InputVariant::Text""Button's variant."
"placeholder""MaybeSignal"r#""""#"Placeholder of input."
"allow_value""Option>""None""Check the incoming value, if it returns false, input will not be accepted."
"on_focus""Option>""None""Callback triggered when the input is focussed on."
"on_blur""Option>""None""Callback triggered when the input is blurred."
+

"Input Slots"

+ + + + + + + + + + + + + + + +
"Name""Default""Description"
"InputSuffix""None""Input content."
} } diff --git a/demo/src/pages/input_number/mod.rs b/demo/src/pages/input_number/mod.rs index fd7b939..c718057 100644 --- a/demo/src/pages/input_number/mod.rs +++ b/demo/src/pages/input_number/mod.rs @@ -1,7 +1,7 @@ use crate::components::{Demo, DemoCode}; use leptos::*; -use thaw::*; use prisms::highlight_str; +use thaw::*; #[component] pub fn InputNumberPage() -> impl IntoView { @@ -36,6 +36,41 @@ pub fn InputNumberPage() -> impl IntoView { "" +

"InputNumber Props"

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
"Name""Type""Default""Description"
"value""RwSignal""T::default()""Set the input value."
"placeholder""MaybeSignal"r#""""#"Placeholder of input number."
"step""MaybeSignal""The number which the current value is increased or decreased on key or button press."
+

"T impl"

+

+ "T: Add + Sub + Default + Clone + FromStr + ToString + 'static" +

} } diff --git a/demo/src/pages/layout/mod.rs b/demo/src/pages/layout/mod.rs index ce01259..784271e 100644 --- a/demo/src/pages/layout/mod.rs +++ b/demo/src/pages/layout/mod.rs @@ -57,6 +57,105 @@ pub fn LayoutPage() -> impl IntoView { "" +

"Layout Props"

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
"Name""Type""Default""Description"
"style""MaybeSignal"r#""""#"Layout's style."
"position""LayoutPosition""LayoutPosition::Static""static position will make it css position set to static. absolute position will make it css position set to absolute and left, right, top, bottom to 0. absolute position is very useful when you want to make content scroll in a fixed container or make the whole page's layout in a fixed position. You may need to change the style of the component to make it display as you expect."
"has_sider""MaybeSignal""false""Whether the component has sider inside. If so it must be true."
"children""Children""Layout's content."
+

"Layout Props"

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
"Name""Type""Default""Description"
"style""MaybeSignal"r#""""#"Layout's style."
"position""LayoutPosition""LayoutPosition::Static""static position will make it css position set to static. absolute position will make it css position set to absolute and left, right, top, bottom to 0. absolute position is very useful when you want to make content scroll in a fixed container or make the whole page's layout in a fixed position. You may need to change the style of the component to make it display as you expect."
"has_sider""MaybeSignal""false""Whether the component has sider inside. If so it must be true."
"children""Children""Layout's content."
+

"LayoutHeader, LayoutSider Props"

+ + + + + + + + + + + + + + + + + + + + + + + +
"Name""Type""Default""Description"
"style""MaybeSignal"r#""""#"LayoutHeader's style."
"children""Children""LayoutHeader's content."
} } diff --git a/demo/src/pages/loading_bar/mod.rs b/demo/src/pages/loading_bar/mod.rs index 29859f0..acbf671 100644 --- a/demo/src/pages/loading_bar/mod.rs +++ b/demo/src/pages/loading_bar/mod.rs @@ -57,6 +57,33 @@ pub fn LoadingBarPage() -> impl IntoView { "" +

"LoadingBar Injection Methods"

+ + + + + + + + + + + + + + + + + + + + + + + + + +
"Name""Type""Description"
"start""fn(&self)""Callback function for loading bar to start loading."
"finish""fn(&self)""The callback function when the loading bar finishes loading."
"error""fn(&self)""Callback function for loading bar error."
} } diff --git a/demo/src/pages/menu/mod.rs b/demo/src/pages/menu/mod.rs index 37cda9c..d77ffa7 100644 --- a/demo/src/pages/menu/mod.rs +++ b/demo/src/pages/menu/mod.rs @@ -1,7 +1,7 @@ use crate::components::{Demo, DemoCode}; use leptos::*; -use thaw::*; use prisms::highlight_str; +use thaw::*; #[component] pub fn MenuPage() -> impl IntoView { @@ -32,6 +32,81 @@ pub fn MenuPage() -> impl IntoView { "" +

"Menu Props"

+ + + + + + + + + + + + + + + + + + + + + + + +
"Name""Type""Default""Description"
"value""MaybeSignal"r#""""#"The selected item key of the menu."
"children""Children""Menu's content."
+

"MenuGroup Props"

+ + + + + + + + + + + + + + + + + + + + + + + +
"Name""Type""Default""Description"
"label""String""The label of the menu group."
"children""Children""MenuGroup's content."
+

"MenuItem Props"

+ + + + + + + + + + + + + + + + + + + + + + + +
"Name""Type""Default""Description"
"label""MaybeSignal"r#""""#"The label of the menu item."
"key""MaybeSignal"r#""""#"The indentifier of the menu item."
} } diff --git a/demo/src/pages/message/mod.rs b/demo/src/pages/message/mod.rs index e5780bd..149ca03 100644 --- a/demo/src/pages/message/mod.rs +++ b/demo/src/pages/message/mod.rs @@ -1,7 +1,7 @@ use crate::components::{Demo, DemoCode}; use leptos::*; -use thaw::*; use prisms::highlight_str; +use thaw::*; #[component] pub fn MessagePage() -> impl IntoView { @@ -72,6 +72,23 @@ pub fn MessagePage() -> impl IntoView { "" +

"MessageProvider Injection Methods"

+ + + + + + + + + + + + + + + +
"Name""Type""Description"
"create""fn(&self, content: String, variant: MessageVariant, options: MessageOptions)""The label of the menu item."
} } diff --git a/demo/src/pages/modal/mod.rs b/demo/src/pages/modal/mod.rs index 228ce4c..45a7e1b 100644 --- a/demo/src/pages/modal/mod.rs +++ b/demo/src/pages/modal/mod.rs @@ -1,7 +1,7 @@ use crate::components::{Demo, DemoCode}; use leptos::*; -use thaw::*; use prisms::highlight_str; +use thaw::*; #[component] pub fn ModalPage() -> impl IntoView { @@ -34,6 +34,55 @@ pub fn ModalPage() -> impl IntoView { "" +

"Modal Props"

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
"Name""Type""Default""Description"
"show""MaybeSignal""Whether to show modal."
"title""MaybeSignal"r#""""#"Modal title."
"children""Children""Modal's content."
+

"Modal Slots"

+ + + + + + + + + + + + + + + + +
"Name""Type""Default""Description"
"ModalFooter""None""Footer content."
} }