mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-22 22:09:22 -05:00
docs: update (#99)
This commit is contained in:
parent
5e2a385446
commit
396e654f0b
40 changed files with 225 additions and 219 deletions
|
@ -3,5 +3,5 @@
|
|||
Installation thaw
|
||||
|
||||
```shell
|
||||
cargo add thaw
|
||||
cargo add thaw --features=csr
|
||||
```
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
To enable the ssr mode, the following configurations are required:
|
||||
|
||||
```toml
|
||||
thaw = { ..., default-features = false, features = ["ssr"] }
|
||||
thaw = { ..., features = ["ssr"] }
|
||||
```
|
||||
|
||||
To enable the hydrate mode, the following configurations are required:
|
||||
|
||||
```toml
|
||||
thaw = { ..., default-features = false, features = ["hydrate"] }
|
||||
thaw = { ..., features = ["hydrate"] }
|
||||
```
|
||||
|
|
|
@ -29,16 +29,16 @@ view! {
|
|||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the NavBar element. |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the NavBar element. |
|
||||
| title | `MaybeSignal<String>` | `Default::default()` | NavBar title. |
|
||||
| left_arrow | `MaybeSignal<bool>` | `false` | Whether to show left arrow. |
|
||||
| left_text | `MaybeSignal<String>` | `Default::default()` | NavBar left text. |
|
||||
| left_text | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | NavBar left text. |
|
||||
| on_click_left | `Option<Callback<ev::MouseEvent>>` | `Default::default()` | NavBar left click. |
|
||||
| right_text | `MaybeSignal<String>` | `Default::default()` | NavBar right text. |
|
||||
| right_text | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | NavBar right text. |
|
||||
| on_click_right | `Option<Callback<ev::MouseEvent>>` | `Default::default()` | NavBar right click. |
|
||||
|
||||
### NavBarLeft and NavBarRight Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the element. |
|
||||
| ----- | ----------------------------------- | -------------------- | ---------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the element. |
|
||||
|
|
|
@ -22,8 +22,8 @@ view! {
|
|||
### Tabbar Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | ------------------ | -------------------- | ----------------- |
|
||||
| value | `RwSignal<String>` | `Default::default()` | Tabbar's value. |
|
||||
| -------- | --------------- | -------------------- | ----------------- |
|
||||
| value | `Model<String>` | `Default::default()` | Tabbar's value. |
|
||||
| children | `Children` | | Tabbar's content. |
|
||||
|
||||
### TabbarItem Props
|
||||
|
|
|
@ -19,8 +19,8 @@ view! {
|
|||
### Alert Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------------- | -------------------- | ----------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Additional classes for the alert element. |
|
||||
| title | `MaybeSignal<String>` | `Default::default()` | Title of the alert. |
|
||||
| -------- | ----------------------------------- | -------------------- | ----------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Additional classes for the alert element. |
|
||||
| title | `Option<MaybeSignal<String>>` | `Default::default()` | Title of the alert. |
|
||||
| variant | `MaybeSignal<AlertVariant>` | | Alert variant. |
|
||||
| children | `Children` | | The content of the alert. |
|
||||
|
|
|
@ -60,9 +60,9 @@ view! {
|
|||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Additional classes for the autocomplete element. |
|
||||
| value | `RwSignal<String>` | `Default::default()` | Input of autocomplete. |
|
||||
| placeholder | `RwSignal<String>` | `Default::default()` | Autocomplete's placeholder. |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Additional classes for the autocomplete element. |
|
||||
| value | `Model<String>` | `Default::default()` | Input of autocomplete. |
|
||||
| placeholder | `OptionalProp<RwSignal<String>>` | `Default::default()` | Autocomplete's placeholder. |
|
||||
| options | `MaybeSignal<Vec<AutoCompleteOption>>` | `Default::default()` | Options to autocomplete from. |
|
||||
| disabled | `MaybeSignal<bool>` | `false` | Whether the input is disabled. |
|
||||
| invalid | `MaybeSignal<bool>` | `false` | Whether the input is invalid. |
|
||||
|
|
|
@ -13,8 +13,8 @@ view! {
|
|||
### Avatar Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ----- | --------------------- | -------------------- | ----------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the avatar element. |
|
||||
| src | `MaybeSignal<String>` | `Default::default()` | Avatar's image source. |
|
||||
| ----- | ----------------------------------- | -------------------- | ----------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the avatar element. |
|
||||
| src | `Option<MaybeSignal<String>>` | `Default::default()` | Avatar's image source. |
|
||||
| round | `MaybeSignal<bool>` | `false` | Whether to display a rounded avatar. |
|
||||
| size | `MaybeSignal<u16>` | `30` | Avatar's size. |
|
||||
|
|
|
@ -36,7 +36,7 @@ view! {
|
|||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the badge element. |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the badge element. |
|
||||
| value | `MaybeSignal<u32>` | `0` | Badge's value. |
|
||||
| max | `MaybeSignal<u32>` | `u32::MAX` | The maximum number of the badge when its value overflows. |
|
||||
| variant | `MaybeSignal<BadgeVariant>` | `BadgeVariant::Error` | Badge variant. |
|
||||
|
|
|
@ -25,14 +25,14 @@ view! {
|
|||
### Breadcrumb Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --------- | --------------------- | -------------------- | --------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the breadcrumb element. |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the breadcrumb element. |
|
||||
| separator | `MaybeSignal<String>` | `/` | Breadcrumb separator. |
|
||||
| children | `Children` | | Breadcrumb's content. |
|
||||
|
||||
### BreadcrumbItem Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | -------------------- | -------------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the breadcrumb link element. |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the breadcrumb link element. |
|
||||
| children | `Children` | | BreadcrumbItem's content. |
|
||||
|
|
|
@ -129,8 +129,8 @@ view! {
|
|||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Additional classes for the button element. |
|
||||
| style | `MaybeSignal<String>` | `Default::default()` | Button's style. |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Additional classes for the button element. |
|
||||
| style | `Option<MaybeSignal<String>>` | `Default::default()` | Button's style. |
|
||||
| variant | `MaybeSignal<ButtonVariant>` | `ButtonVariant::Primary` | Button's variant. |
|
||||
| color | `MaybeSignal<ButtonColor>` | `ButtonColor::Primary` | Button's color. |
|
||||
| round | `MaybeSignal<bool>` | `false` | Whether the button shows rounded corners. |
|
||||
|
@ -140,4 +140,11 @@ view! {
|
|||
| disabled | `MaybeSignal<bool>` | `false` | Whether the button is disabled. |
|
||||
| size | `MaybeSignal<ButtonSize>` | `ButtonSize::Medium` | Button size. |
|
||||
| on_click | `Option<Callback<ev::MouseEvent>>` | `None` | Listen for button click events. |
|
||||
| children | `Children` | | Button's content. |
|
||||
| children | `Option<Children>` | | Button's content. |
|
||||
|
||||
### ButtonGroup props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | ---------- | ------- | ----------------------------------- |
|
||||
| vertical | `bool` | `false` | Directions of buttons in the group. |
|
||||
| children | `Children` | | ButtonGroup's content. |
|
||||
|
|
|
@ -12,6 +12,6 @@ view! {
|
|||
### Calendar Props
|
||||
|
||||
| Name | Type | Default | Desciption |
|
||||
| ----- | ----------------------------- | -------------------- | ------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the calendar element. |
|
||||
| value | `RwSignal<Option<NaiveDate>>` | `Default::default()` | Set the calendar value |
|
||||
| ----- | ----------------------------------- | -------------------- | ------------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the calendar element. |
|
||||
| value | `Model<Option<NaiveDate>>` | `Default::default()` | Set the calendar value |
|
||||
|
|
|
@ -24,9 +24,9 @@ view! {
|
|||
### Card Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | -------------------- | --------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the card element. |
|
||||
| title | `MaybeSignal<String>` | `Default::default()` | Card title. |
|
||||
| -------- | ----------------------------------- | -------------------- | --------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the card element. |
|
||||
| title | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Card title. |
|
||||
| children | `Children` | | Card's content. |
|
||||
|
||||
### Card Slots
|
||||
|
|
|
@ -29,22 +29,22 @@ view! {
|
|||
### Checkbox Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | -------------------- | ------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the checkbox element. |
|
||||
| value | `RwSignal<bool>` | `false` | Whether the checkbox is being checked. |
|
||||
| -------- | ----------------------------------- | -------------------- | ------------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the checkbox element. |
|
||||
| value | `Model<bool>` | `false` | Whether the checkbox is being checked. |
|
||||
| children | `Children` | | Checkbox's content. |
|
||||
|
||||
### CheckboxGroup Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------------- | -------------------- | ------------------------------------- |
|
||||
| value | `RwSignal<HashSet<String>>` | `Default::default()` | Sets the value of the checkbox group. |
|
||||
| -------- | ------------------------ | -------------------- | ------------------------------------- |
|
||||
| value | `Model<HashSet<String>>` | `Default::default()` | Sets the value of the checkbox group. |
|
||||
| children | `Children` | | CheckboxGroup's content. |
|
||||
|
||||
### CheckboxItem Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ----- | --------------------- | -------------------- | ------------------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the checkbox element. |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the checkbox element. |
|
||||
| key | `String` | | The key of the checkbox to be used in a checkbox group. |
|
||||
| label | `Option<String>` | `None` | Checkbox's label. |
|
||||
|
|
|
@ -40,17 +40,17 @@ view! {
|
|||
### Collapse Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --------- | --------------------------- | -------------------- | ------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the collapse element. |
|
||||
| value | `RwSignal<HashSet<String>>` | `Default::default()` | Currently active panel. |
|
||||
| --------- | ----------------------------------- | -------------------- | ------------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the collapse element. |
|
||||
| value | `Model<HashSet<String>>` | `Default::default()` | Currently active panel. |
|
||||
| accordion | `bool` | `false` | Only allow one panel open at a time. |
|
||||
| children | `Children` | | Collapse's content. |
|
||||
|
||||
### CollapseItem Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ------- | --------------------- | -------------------- | ------------------------------------------------ |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the collapse item element. |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the collapse item element. |
|
||||
| title | `MaybeSignal<String>` | | The title of the CollapseItem. |
|
||||
| key | `MaybeSignal<String>` | | The indentifier of CollapseItem. |
|
||||
| chilren | `Children` | | CollapseItem's content. |
|
||||
|
|
|
@ -30,7 +30,7 @@ view! {
|
|||
}
|
||||
```
|
||||
|
||||
### DatePicker Props
|
||||
### ColorPicker Props
|
||||
|
||||
| Name | Type | Default | Desciption |
|
||||
| ----- | ----------------------------------- | -------------------- | ----------------------------------------------- |
|
||||
|
|
|
@ -13,6 +13,6 @@ view! {
|
|||
|
||||
| Name | Type | Default | Desciption |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the date picker element. |
|
||||
| value | `RwSignal<Option<NaiveDate>>` | `Default::default()` | Set the date picker value |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the date picker element. |
|
||||
| value | `Model<Option<NaiveDate>>` | `Default::default()` | Set the date picker value |
|
||||
| attr: | `Vec<(&'static str, Attribute)>` | `Default::default()` | The dom attrs of the input element inside the component. |
|
||||
|
|
|
@ -11,5 +11,5 @@ view! {
|
|||
### Divider Props
|
||||
|
||||
| Name | Type | Default | Desciption |
|
||||
| ----- | --------------------- | -------------------- | ------------------------------------------ |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the divider element. |
|
||||
| ----- | ----------------------------------- | -------------------- | ------------------------------------------ |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the divider element. |
|
||||
|
|
|
@ -40,10 +40,10 @@ view! {
|
|||
### Drawer Props
|
||||
|
||||
| Name | Type | Default | Desciption |
|
||||
| --------- | ------------------------------ | ------------------------ | ----------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the drawer element. |
|
||||
| show | `MaybeSignal<bool>` | | Whether to show drawer. |
|
||||
| title | `MaybeSignal<String>` | `Default::default()` | Drawer title. |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the drawer element. |
|
||||
| show | `Model<bool>` | | Whether to show drawer. |
|
||||
| title | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Drawer title. |
|
||||
| placement | `MaybeSignal<DrawerPlacement>` | `DrawerPlacement::Right` | Drawer placement. |
|
||||
| width | `MaybeSignal<String>` | `520px` | Drawer width. |
|
||||
| height | `MaybeSignal<String>` | `260px` | Drawer height. |
|
||||
|
|
|
@ -96,8 +96,8 @@ view! {
|
|||
### Grid Props
|
||||
|
||||
| Name | Type | Default | Desciption |
|
||||
| ----- | --------------------- | -------------------- | --------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the grid element. |
|
||||
| ----- | ----------------------------------- | -------------------- | --------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the grid element. |
|
||||
| cols | `MaybeSignal<u16>` | `1` | Number of grids displayed. |
|
||||
| x_gap | `MaybeSignal<u16>` | `0` | Horizontal gap. |
|
||||
| y_gap | `MaybeSignal<u16>` | `0` | Vertical gap. |
|
||||
|
@ -105,7 +105,7 @@ view! {
|
|||
### GridItem Props
|
||||
|
||||
| Name | Type | Default | Desciption |
|
||||
| ------ | --------------------- | -------------------- | --------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the grid item element. |
|
||||
| ------ | ----------------------------------- | -------------------- | --------------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the grid item element. |
|
||||
| column | `MaybeSignal<u16>` | `1` | Number of columns this grid item will occupy. |
|
||||
| offset | `MaybeSignal<u16>` | `0` | Horizontal offset. |
|
||||
|
|
|
@ -10,10 +10,10 @@ view! {
|
|||
### Image Props
|
||||
|
||||
| Name | Type | Default | Desciption |
|
||||
| ------------- | --------------------- | -------------------- | ---------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the image element. |
|
||||
| src | `MaybeSignal<String>` | `Default::default()` | Image source. |
|
||||
| alt | `MaybeSignal<String>` | `Default::default()` | Image alt information. |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the image element. |
|
||||
| src | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Image source. |
|
||||
| alt | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Image alt information. |
|
||||
| width | `MaybeSignal<String>` | `Default::default()` | Image width. |
|
||||
| height | `MaybeSignal<String>` | `Default::default()` | Image height. |
|
||||
| border_radius | `MaybeSignal<String>` | `Default::default()` | Image border radius. |
|
||||
|
|
|
@ -98,10 +98,10 @@ view! {
|
|||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the input element. |
|
||||
| value | `RwSignal<String>` | `Default::default()` | Set the input value. |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the input element. |
|
||||
| value | `Model<String>` | `Default::default()` | Set the input value. |
|
||||
| variant | `MaybeSignal<InputVariant>` | `InputVariant::Text` | Input's variant. |
|
||||
| placeholder | `MaybeSignal<String>` | `Default::default()` | Placeholder of input. |
|
||||
| placeholder | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Placeholder of input. |
|
||||
| disabled | `MaybeSignal<bool>` | `false` | Whether the input is disabled. |
|
||||
| invalid | `MaybeSignal<bool>` | `false` | Whether the input is invalid. |
|
||||
| allow_value | `Option<Callback<String, bool>>` | `None` | Check the incoming value, if it returns false, input will not be accepted. |
|
||||
|
|
|
@ -36,9 +36,9 @@ view! {
|
|||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the input element. |
|
||||
| value | `RwSignal<T>` | `T::default()` | Set the input value. |
|
||||
| placeholder | `MaybeSignal<String>` | `Default::default()` | Placeholder of input number. |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the input element. |
|
||||
| value | `Model<T>` | `T::default()` | Set the input value. |
|
||||
| placeholder | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Placeholder of input number. |
|
||||
| step | `MaybeSignal<T>` | | The number which the current value is increased or decreased on key or button press. |
|
||||
| disabled | `MaybeSignal<bool>` | `false` | Whether the input is disabled. |
|
||||
| invalid | `MaybeSignal<bool>` | `false` | Whether the input is invalid. |
|
||||
|
|
|
@ -35,15 +35,16 @@ view! {
|
|||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the layout element. |
|
||||
| style | `MaybeSignal<String>` | `Default::default()` | Layout's style. |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the layout element. |
|
||||
| style | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | 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<bool>` | `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 |
|
||||
| -------- | --------------------- | -------------------- | ------------------------------------------------ |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the layout header element. |
|
||||
| style | `MaybeSignal<String>` | `Default::default()` | LayoutHeader's style. |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the layout header element. |
|
||||
| style | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | LayoutHeader's style. |
|
||||
| children | `Children` | | LayoutHeader's content. |
|
||||
|
|
|
@ -14,23 +14,23 @@ view! {
|
|||
### Menu Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | -------------------- | --------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the menu element. |
|
||||
| value | `MaybeSignal<String>` | `Default::default()` | The selected item key of the menu. |
|
||||
| -------- | ----------------------------------- | -------------------- | --------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the menu element. |
|
||||
| value | `Model<String>` | `Default::default()` | The selected item key of the menu. |
|
||||
| children | `Children` | | Menu's content. |
|
||||
|
||||
### MenuGroup Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | -------------------- | --------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the menu group element. |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the menu group element. |
|
||||
| label | `String` | | The label of the menu group. |
|
||||
| children | `Children` | | MenuGroup's content. |
|
||||
|
||||
### MenuItem Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ----- | --------------------- | -------------------- | -------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the menu item element. |
|
||||
| ----- | ----------------------------------- | -------------------- | -------------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the menu item element. |
|
||||
| label | `MaybeSignal<String>` | `Default::default()` | The label of the menu item. |
|
||||
| key | `MaybeSignal<String>` | `Default::default()` | The indentifier of the menu item. |
|
||||
|
|
|
@ -36,7 +36,7 @@ view! {
|
|||
### MessageProvider Props
|
||||
|
||||
| Name | Type | Default | Desciption |
|
||||
| --------- | ----------------------------- | ----------------------- | ------------------------------- |
|
||||
| --------- | ------------------ | ----------------------- | ------------------------------- |
|
||||
| placement | `MessagePlacement` | `MessagePlacement::Top` | Position to place the messages. |
|
||||
|
||||
### MessageProvider Injection Methods
|
||||
|
@ -48,6 +48,6 @@ view! {
|
|||
### MessageOptions fields
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | ----------------- | ------------------------- | --------------------------------------------------------------- |
|
||||
| duration | `Duration` | `Duration::from_secs(3)` | How long the message will be displayed. 0 for permanent message |
|
||||
| --- | --- | --- | --- |
|
||||
| duration | `Duration` | `std::time::Duration::from_secs(3)` | How long the message will be displayed. 0 for permanent message |
|
||||
| closable | `bool` | `false` | Can the message be manually closed. |
|
||||
|
|
|
@ -15,7 +15,7 @@ view! {
|
|||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | -------------------- | ---------------------- |
|
||||
| show | `MaybeSignal<bool>` | | Whether to show modal. |
|
||||
| show | `Model<bool>` | | Whether to show modal. |
|
||||
| title | `MaybeSignal<String>` | `Default::default()` | Modal title. |
|
||||
| children | `Children` | | Modal's content. |
|
||||
|
||||
|
|
|
@ -132,8 +132,8 @@ view! {
|
|||
### Popover Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --------- | --------------------- | ----------------------- | ----------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Content class of the popover. |
|
||||
| --------- | ----------------------------------- | ----------------------- | ----------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Content class of the popover. |
|
||||
| placement | `PopoverPlacement` | `PopoverPlacement::Top` | Popover placement. |
|
||||
| children | `Children` | | The content inside popover. |
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ view! {
|
|||
### Radio Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | -------------------- | ---------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the radio element. |
|
||||
| value | `RwSignal<bool>` | `false` | Checked value. |
|
||||
| -------- | ----------------------------------- | -------------------- | ---------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the radio element. |
|
||||
| value | `Model<bool>` | `false` | Checked value. |
|
||||
| children | `Children` | | Radio's content. |
|
||||
|
|
|
@ -23,6 +23,6 @@ view! {
|
|||
|
||||
| Name | Type | Default | Description |
|
||||
| ------- | ----------------------------------- | -------------------- | ----------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the select element. |
|
||||
| value | `RwSignal<Option<T>>` | `None` | Checked value. |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the select element. |
|
||||
| value | `Model<Option<T>>` | `None` | Checked value. |
|
||||
| options | `MaybeSignal<Vec<SelectOption<T>>>` | `vec![]` | Options that can be selected. |
|
||||
|
|
|
@ -41,8 +41,8 @@ view! {
|
|||
### Slider Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | -------------------- | ----------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the slider element. |
|
||||
| -------- | ----------------------------------- | -------------------- | ----------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the slider element. |
|
||||
| value | `MaybeSignal<f64>` | `Default::default()` | Value of the slider. |
|
||||
| max | `MaybeSignal<f64>` | `100` | Max value of the slider. |
|
||||
| step | `MaybeSignal<f64>` | `Default::default()` | The step in which value is incremented. |
|
||||
|
|
|
@ -42,8 +42,8 @@ view! {
|
|||
### Space Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | -------------------- | ---------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the space element. |
|
||||
| -------- | ----------------------------------- | -------------------- | ---------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the space element. |
|
||||
| vertical | `bool` | `false` | Whether to lay out vertically. |
|
||||
| gap | `SpaceGap` | `SpaceGap::Medium` | Space's gap. |
|
||||
| children | `Children` | | Space's content. |
|
||||
|
|
|
@ -22,6 +22,6 @@ view! {
|
|||
### Spinner Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ----- | -------------------------- | --------------------- | ------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Additional classes for the spinner element. |
|
||||
| ----- | ----------------------------------- | --------------------- | ------------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Additional classes for the spinner element. |
|
||||
| size | `MaybeSignal<SpinnerSize>` | `SpinnerSize::Medium` | Spinner size. |
|
||||
|
|
|
@ -11,6 +11,6 @@ view! {
|
|||
### Switch Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ----- | --------------------- | -------------------- | ----------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the switch element. |
|
||||
| value | `RwSignal<bool>` | `Default::default()` | Switch's value. |
|
||||
| ----- | ----------------------------------- | -------------------- | ----------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the switch element. |
|
||||
| value | `Model<bool>` | `false` | Switch's value. |
|
||||
|
|
|
@ -29,9 +29,9 @@ view! {
|
|||
### Table Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ------------- | --------------------- | -------------------- | ------------------------------------------------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the table element. |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the table element. |
|
||||
| style | `MaybeSignal<String>` | `Default::default()` | Table's style. |
|
||||
| single_row | `RwSignal<bool>` | `true` | Whether columns are not divided. If the prop is true, table cell has no border-right. |
|
||||
| single_column | `RwSignal<bool>` | `false` | Whether rows are not divided. If the prop is true, table cell has no border-bottom. |
|
||||
| single_row | `MaybeSignal<bool>` | `true` | Whether columns are not divided. If the prop is true, table cell has no border-right. |
|
||||
| single_column | `MaybeSignal<bool>` | `false` | Whether rows are not divided. If the prop is true, table cell has no border-bottom. |
|
||||
| children | `Children` | | Table's content. |
|
||||
|
|
|
@ -45,16 +45,16 @@ view! {
|
|||
### Tabs Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | --------------------- | --------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the tabs element. |
|
||||
| value | `RwSignal<String>` | `TagVariant::Default` | Tabs value. |
|
||||
| -------- | ----------------------------------- | -------------------- | --------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the tabs element. |
|
||||
| value | `Model<String>` | `Default::default()` | Tabs value. |
|
||||
| children | `Children` | | Tabs content. |
|
||||
|
||||
### Tab Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | -------------------- | -------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the tab element. |
|
||||
| -------- | ----------------------------------- | -------------------- | -------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the tab element. |
|
||||
| key | `String` | | The indentifier of the tab. |
|
||||
| label | `String` | `Default::default()` | The label of the tab. |
|
||||
| children | `Children` | | Tabs content. |
|
||||
|
|
|
@ -14,7 +14,7 @@ view! {
|
|||
### Tag Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | ------------------------- | --------------------- | -------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the tag element. |
|
||||
| -------- | ----------------------------------- | --------------------- | -------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the tag element. |
|
||||
| variant | `MaybeSignal<TagVariant>` | `TagVariant::Default` | Tag's variant. |
|
||||
| children | `Children` | | Tag's content. |
|
||||
|
|
|
@ -13,7 +13,7 @@ view! {
|
|||
## TimePicker Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ----- | -------------------------------- | -------------------- | -------------------------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the time picker element. |
|
||||
| value | `RwSignal<Option<NaiveTime>>` | `Default::default()` | Set the TimePicker value. |
|
||||
| --- | --- | --- | --- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the time picker element. |
|
||||
| value | `Model<Option<NaiveTime>>` | `Default::default()` | Set the TimePicker value. |
|
||||
| attr: | `Vec<(&'static str, Attribute)>` | `Default::default()` | The dom attrs of the input element inside the component. |
|
||||
|
|
|
@ -12,7 +12,7 @@ view! {
|
|||
## Text Props
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| -------- | --------------------- | -------------------- | --------------------------------------- |
|
||||
| class | `MaybeSignal<String>` | `Default::default()` | Addtional classes for the text element. |
|
||||
| -------- | ----------------------------------- | -------------------- | --------------------------------------- |
|
||||
| class | `OptionalProp<MaybeSignal<String>>` | `Default::default()` | Addtional classes for the text element. |
|
||||
| code | `bool` | `false` | Use the code tag and style. |
|
||||
| children | `Children` | | Text's content. |
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use super::{message_environment::MessageEnvironment, MessageVariant};
|
||||
use crate::{
|
||||
components::Teleport,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use leptos::*;
|
||||
|
||||
use crate::utils::mount_style;
|
||||
use leptos::*;
|
||||
|
||||
#[component]
|
||||
pub fn SliderLabel(#[prop(into)] value: MaybeSignal<f64>, children: Children) -> impl IntoView {
|
||||
|
|
Loading…
Add table
Reference in a new issue