mirror of
https://github.com/adoyle0/thaw.git
synced 2025-03-13 05:59:49 -04:00
docs: add props
This commit is contained in:
parent
d13928e97d
commit
abbaebbfe5
14 changed files with 422 additions and 53 deletions
|
@ -94,43 +94,6 @@ pub fn LayoutPage() -> impl IntoView {
|
|||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
<h3>"Layout Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"style"</td>
|
||||
<td>"MaybeSignal<String>"</td>
|
||||
<td>r#""""#</td>
|
||||
<td>"Layout's style."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"position"</td>
|
||||
<td>"LayoutPosition"</td>
|
||||
<td>"LayoutPosition::Static"</td>
|
||||
<td>"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."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"has_sider"</td>
|
||||
<td>"MaybeSignal<bool>"</td>
|
||||
<td>"false"</td>
|
||||
<td>"Whether the component has sider inside. If so it must be true."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"children"</td>
|
||||
<td>"Children"</td>
|
||||
<td></td>
|
||||
<td>"Layout's content."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
<h3>"LayoutHeader, LayoutSider Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
|
|
|
@ -69,17 +69,17 @@ pub fn LoadingBarPage() -> impl IntoView {
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>"start"</td>
|
||||
<th>"fn(&self)"</th>
|
||||
<td>"fn(&self)"</td>
|
||||
<td>"Callback function for loading bar to start loading."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"finish"</td>
|
||||
<th>"fn(&self)"</th>
|
||||
<td>"fn(&self)"</td>
|
||||
<td>"The callback function when the loading bar finishes loading."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"error"</td>
|
||||
<th>"fn(&self)"</th>
|
||||
<td>"fn(&self)"</td>
|
||||
<td>"Callback function for loading bar error."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::components::{Demo, DemoCode};
|
||||
use leptos::*;
|
||||
use thaw::*;
|
||||
use prisms::highlight_str;
|
||||
use thaw::*;
|
||||
|
||||
#[component]
|
||||
pub fn RadioPage() -> impl IntoView {
|
||||
|
@ -30,6 +30,31 @@ pub fn RadioPage() -> impl IntoView {
|
|||
""
|
||||
</DemoCode>
|
||||
</Demo>
|
||||
<h3>"Radio Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"value"</td>
|
||||
<td>"RwSignal<bool>"</td>
|
||||
<td>"false"</td>
|
||||
<td>"Checked value."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"children"</td>
|
||||
<td>"Children"</td>
|
||||
<td></td>
|
||||
<td>"Radio's content."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::components::{Demo, DemoCode};
|
||||
use leptos::*;
|
||||
use thaw::*;
|
||||
use prisms::highlight_str;
|
||||
use thaw::*;
|
||||
|
||||
#[component]
|
||||
pub fn SelectPage() -> impl IntoView {
|
||||
|
@ -35,6 +35,31 @@ pub fn SelectPage() -> impl IntoView {
|
|||
""
|
||||
</DemoCode>
|
||||
</Demo>
|
||||
<h3>"Select Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"value"</td>
|
||||
<td>"RwSignal<Option<T>>"</td>
|
||||
<td>"None"</td>
|
||||
<td>"Checked value."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"options"</td>
|
||||
<td>"MaybeSignal<Vec<SelectOption<T>>>"</td>
|
||||
<td>"vec![]"</td>
|
||||
<td>"Options that can be selected."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::components::{Demo, DemoCode};
|
||||
use leptos::*;
|
||||
use thaw::*;
|
||||
use prisms::highlight_str;
|
||||
use thaw::*;
|
||||
|
||||
#[component]
|
||||
pub fn SkeletonPage() -> impl IntoView {
|
||||
|
@ -25,6 +25,43 @@ pub fn SkeletonPage() -> impl IntoView {
|
|||
""
|
||||
</DemoCode>
|
||||
</Demo>
|
||||
<h3>"Skeleton Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"repeat"</td>
|
||||
<td>"MaybeSignal<u32>"</td>
|
||||
<td>"1"</td>
|
||||
<td>"Repeat frequency."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"text"</td>
|
||||
<td>"MaybeSignal<bool>"</td>
|
||||
<td>"false"</td>
|
||||
<td>"Text skeleton."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"width"</td>
|
||||
<td>"Option<MaybeSignal<String>>"</td>
|
||||
<td>"None"</td>
|
||||
<td>"Skeleton width."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"height"</td>
|
||||
<td>"Option<MaybeSignal<String>>"</td>
|
||||
<td>"None"</td>
|
||||
<td>"Text skeleton."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::components::{Demo, DemoCode};
|
||||
use leptos::*;
|
||||
use thaw::*;
|
||||
use prisms::highlight_str;
|
||||
use thaw::*;
|
||||
|
||||
#[component]
|
||||
pub fn SliderPage() -> impl IntoView {
|
||||
|
@ -27,6 +27,31 @@ pub fn SliderPage() -> impl IntoView {
|
|||
""
|
||||
</DemoCode>
|
||||
</Demo>
|
||||
<h3>"Slider Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"value"</td>
|
||||
<td>"RwSignal<f64>"</td>
|
||||
<td>"0"</td>
|
||||
<td>"Value of the slider."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"max"</td>
|
||||
<td>"MaybeSignal<f64>"</td>
|
||||
<td>"100"</td>
|
||||
<td>"Max value of the slider."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::components::{Demo, DemoCode};
|
||||
use leptos::*;
|
||||
use thaw::*;
|
||||
use prisms::highlight_str;
|
||||
use thaw::*;
|
||||
|
||||
#[component]
|
||||
pub fn SpacePage() -> impl IntoView {
|
||||
|
@ -89,6 +89,37 @@ pub fn SpacePage() -> impl IntoView {
|
|||
""
|
||||
</DemoCode>
|
||||
</Demo>
|
||||
<h3>"Space Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"gap"</td>
|
||||
<td>"SpaceGap"</td>
|
||||
<td>"SpaceGap::Medium"</td>
|
||||
<td>"Space's gap."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"vertical"</td>
|
||||
<td>"MaybeSignal<f64>"</td>
|
||||
<td>"false"</td>
|
||||
<td>"Whether to lay out vertically."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"children"</td>
|
||||
<td>"Children"</td>
|
||||
<td></td>
|
||||
<td>"Space's content."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::components::{Demo, DemoCode};
|
||||
use leptos::*;
|
||||
use thaw::*;
|
||||
use prisms::highlight_str;
|
||||
use thaw::*;
|
||||
|
||||
#[component]
|
||||
pub fn SwitchPage() -> impl IntoView {
|
||||
|
@ -27,6 +27,25 @@ pub fn SwitchPage() -> impl IntoView {
|
|||
""
|
||||
</DemoCode>
|
||||
</Demo>
|
||||
<h3>"Swith Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"value"</td>
|
||||
<td>"RwSignal<bool>"</td>
|
||||
<td>"false"</td>
|
||||
<td>"Swith's value."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@ use crate::{
|
|||
pages::MobilePage,
|
||||
};
|
||||
use leptos::*;
|
||||
use thaw::mobile::*;
|
||||
use prisms::highlight_str;
|
||||
use thaw::{mobile::*, Table};
|
||||
|
||||
#[component]
|
||||
pub fn TabbarPage() -> impl IntoView {
|
||||
|
@ -39,6 +39,62 @@ pub fn TabbarPage() -> impl IntoView {
|
|||
""
|
||||
</DemoCode>
|
||||
</Demo>
|
||||
<h3>"Tabbar Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"value"</td>
|
||||
<td>"RwSignal<String>"</td>
|
||||
<td>r#""""#</td>
|
||||
<td>"Tabbar's value."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"children"</td>
|
||||
<td>"Children"</td>
|
||||
<td></td>
|
||||
<td>"Tabbar's content."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
<h3>"TabbarItem Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"key"</td>
|
||||
<td>"MaybeSignal<String>"</td>
|
||||
<td>r#""""#</td>
|
||||
<td>"The indentifier of the tabbar item."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"icon"</td>
|
||||
<td>"Option<Icon>"</td>
|
||||
<td>"None"</td>
|
||||
<td>"TabbarItem's icon."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"children"</td>
|
||||
<td>"Children"</td>
|
||||
<td></td>
|
||||
<td>"TabbarItem's content."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
<div>
|
||||
<MobilePage path="/thaw?path=/mobile/tabbar"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::components::{Demo, DemoCode};
|
||||
use leptos::*;
|
||||
use thaw::*;
|
||||
use prisms::highlight_str;
|
||||
use thaw::*;
|
||||
|
||||
#[component]
|
||||
pub fn TablePage() -> impl IntoView {
|
||||
|
@ -86,6 +86,18 @@ pub fn TablePage() -> impl IntoView {
|
|||
<td>"false"</td>
|
||||
<td>""</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"style"</td>
|
||||
<td>"MaybeSignal<String>"</td>
|
||||
<td>r#""""#</td>
|
||||
<td>"Table's style."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"children"</td>
|
||||
<td>"Children"</td>
|
||||
<td></td>
|
||||
<td>"Table's content."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::components::{Demo, DemoCode};
|
||||
use leptos::*;
|
||||
use thaw::*;
|
||||
use prisms::highlight_str;
|
||||
use thaw::*;
|
||||
|
||||
#[component]
|
||||
pub fn TabsPage() -> impl IntoView {
|
||||
|
@ -39,6 +39,62 @@ pub fn TabsPage() -> impl IntoView {
|
|||
""
|
||||
</DemoCode>
|
||||
</Demo>
|
||||
<h3>"Tabs Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"value"</td>
|
||||
<td>"RwSignal<String>"</td>
|
||||
<td>r#""""#</td>
|
||||
<td>"Tabs value."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"children"</td>
|
||||
<td>"Children"</td>
|
||||
<td></td>
|
||||
<td>"Tabs content."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
<h3>"Tab Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"key"</td>
|
||||
<td>"String"</td>
|
||||
<td></td>
|
||||
<td>"The indentifier of the tab."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"label"</td>
|
||||
<td>"String"</td>
|
||||
<td></td>
|
||||
<td>"The label of the tab."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"children"</td>
|
||||
<td>"Children"</td>
|
||||
<td></td>
|
||||
<td>"Tab's content."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::components::{Demo, DemoCode};
|
||||
use leptos::*;
|
||||
use thaw::*;
|
||||
use prisms::highlight_str;
|
||||
use thaw::*;
|
||||
|
||||
#[component]
|
||||
pub fn TagPage() -> impl IntoView {
|
||||
|
@ -49,6 +49,31 @@ pub fn TagPage() -> impl IntoView {
|
|||
""
|
||||
</DemoCode>
|
||||
</Demo>
|
||||
<h3>"Tag Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"variant"</td>
|
||||
<td>"MaybeSignal<TagVariant>"</td>
|
||||
<td>"TagVariant::Default"</td>
|
||||
<td>"Tag's variant."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"children"</td>
|
||||
<td>"Children"</td>
|
||||
<td></td>
|
||||
<td>"Tag's content."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,10 @@ use crate::{
|
|||
pages::MobilePage,
|
||||
};
|
||||
use leptos::*;
|
||||
use thaw::mobile::*;
|
||||
use thaw::*;
|
||||
use prisms::highlight_str;
|
||||
use std::time::Duration;
|
||||
use thaw::mobile::*;
|
||||
use thaw::*;
|
||||
|
||||
#[component]
|
||||
pub fn ToastPage() -> impl IntoView {
|
||||
|
@ -36,6 +36,45 @@ pub fn ToastPage() -> impl IntoView {
|
|||
""
|
||||
</DemoCode>
|
||||
</Demo>
|
||||
<h3>"Toast Methods"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"show_toast"</td>
|
||||
<td>"fn(options: ToastOptions))"</td>
|
||||
<td>"Show toast."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
<h3>"ToastOptions Properties"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"message"</td>
|
||||
<td>"String"</td>
|
||||
<td>"message."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"duration"</td>
|
||||
<td>"std::time::Duration"</td>
|
||||
<td>"show duration."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
<div>
|
||||
<MobilePage path="/thaw?path=/mobile/toast"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use crate::components::{Demo, DemoCode};
|
||||
use leptos::*;
|
||||
use thaw::*;
|
||||
use prisms::highlight_str;
|
||||
use thaw::*;
|
||||
|
||||
#[component]
|
||||
pub fn UploadPage() -> impl IntoView {
|
||||
|
@ -83,6 +83,62 @@ pub fn UploadPage() -> impl IntoView {
|
|||
""
|
||||
</DemoCode>
|
||||
</Demo>
|
||||
<h3>"Upload Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"accept"</td>
|
||||
<td>"MaybeSignal<String>"</td>
|
||||
<td>r#""""#</td>
|
||||
<td>"The accept type of upload."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"multiple"</td>
|
||||
<td>"MaybeSignal<bool>"</td>
|
||||
<td>"false"</td>
|
||||
<td>"Allow multiple files to be selected."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"custom_request"</td>
|
||||
<td>"Option<Callback<FileList, ()>>"</td>
|
||||
<td>r#""""#</td>
|
||||
<td>"Customize upload request."</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>"children"</td>
|
||||
<td>"Children"</td>
|
||||
<td></td>
|
||||
<td>"Upload's content."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
<h3>"UploadDragger Props"</h3>
|
||||
<Table single_column=true>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>"Name"</th>
|
||||
<th>"Type"</th>
|
||||
<th>"Default"</th>
|
||||
<th>"Description"</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>"children"</td>
|
||||
<td>"Children"</td>
|
||||
<td></td>
|
||||
<td>"UploadDragger's content."</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</Table>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue