From 396e654f0b2cf50867ad01db2895d985877a6de1 Mon Sep 17 00:00:00 2001
From: luoxiaozero <48741584+luoxiaozero@users.noreply.github.com>
Date: Fri, 9 Feb 2024 22:44:22 +0800
Subject: [PATCH] docs: update (#99)
---
demo_markdown/docs/_guide/installation.md | 2 +-
.../docs/_guide/server_sider_rendering.md | 4 +--
demo_markdown/docs/_mobile/nav_bar/mod.md | 14 ++++-----
demo_markdown/docs/_mobile/tabbar/mod.md | 8 ++---
demo_markdown/docs/alert/mod.md | 12 ++++----
demo_markdown/docs/auto_complete/mod.md | 6 ++--
demo_markdown/docs/avatar/mod.md | 12 ++++----
demo_markdown/docs/badge/mod.md | 2 +-
demo_markdown/docs/breadcrumb/mod.md | 18 +++++------
demo_markdown/docs/button/mod.md | 13 ++++++--
demo_markdown/docs/calendar/mod.md | 8 ++---
demo_markdown/docs/card/mod.md | 10 +++----
demo_markdown/docs/checkbox/mod.md | 28 ++++++++---------
demo_markdown/docs/collapse/mod.md | 24 +++++++--------
demo_markdown/docs/color_picker/mod.md | 2 +-
demo_markdown/docs/date_picker/mod.md | 4 +--
demo_markdown/docs/divider/mod.md | 6 ++--
demo_markdown/docs/drawer/mod.md | 22 +++++++-------
demo_markdown/docs/grid/mod.md | 22 +++++++-------
demo_markdown/docs/image/mod.md | 18 +++++------
demo_markdown/docs/input/mod.md | 6 ++--
demo_markdown/docs/input_number/mod.md | 8 ++---
demo_markdown/docs/layout/mod.md | 15 +++++-----
demo_markdown/docs/menu/mod.md | 30 +++++++++----------
demo_markdown/docs/message/mod.md | 14 ++++-----
demo_markdown/docs/modal/mod.md | 2 +-
demo_markdown/docs/popover/mod.md | 10 +++----
demo_markdown/docs/radio/mod.md | 10 +++----
demo_markdown/docs/select/mod.md | 4 +--
demo_markdown/docs/slider/mod.md | 14 ++++-----
demo_markdown/docs/space/mod.md | 12 ++++----
demo_markdown/docs/spinner/mod.md | 8 ++---
demo_markdown/docs/switch/mod.md | 8 ++---
demo_markdown/docs/table/mod.md | 14 ++++-----
demo_markdown/docs/tabs/mod.md | 22 +++++++-------
demo_markdown/docs/tag/mod.md | 10 +++----
demo_markdown/docs/time_picker/mod.md | 8 ++---
demo_markdown/docs/typography/mod.md | 10 +++----
thaw/src/message/message_provider.rs | 1 -
thaw/src/slider/slider_label.rs | 3 +-
40 files changed, 225 insertions(+), 219 deletions(-)
diff --git a/demo_markdown/docs/_guide/installation.md b/demo_markdown/docs/_guide/installation.md
index aea6c9c..0b55806 100644
--- a/demo_markdown/docs/_guide/installation.md
+++ b/demo_markdown/docs/_guide/installation.md
@@ -3,5 +3,5 @@
Installation thaw
```shell
-cargo add thaw
+cargo add thaw --features=csr
```
diff --git a/demo_markdown/docs/_guide/server_sider_rendering.md b/demo_markdown/docs/_guide/server_sider_rendering.md
index bc8e91c..68fce55 100644
--- a/demo_markdown/docs/_guide/server_sider_rendering.md
+++ b/demo_markdown/docs/_guide/server_sider_rendering.md
@@ -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"] }
```
diff --git a/demo_markdown/docs/_mobile/nav_bar/mod.md b/demo_markdown/docs/_mobile/nav_bar/mod.md
index 78993a1..7940912 100644
--- a/demo_markdown/docs/_mobile/nav_bar/mod.md
+++ b/demo_markdown/docs/_mobile/nav_bar/mod.md
@@ -17,7 +17,7 @@ view! {
on_click_right=on_click_right
>
-
+
{move || click_text.get()}
@@ -29,16 +29,16 @@ view! {
| Name | Type | Default | Description |
| --- | --- | --- | --- |
-| class | `MaybeSignal` | `Default::default()` | Addtional classes for the NavBar element. |
+| class | `OptionalProp>` | `Default::default()` | Addtional classes for the NavBar element. |
| title | `MaybeSignal` | `Default::default()` | NavBar title. |
| left_arrow | `MaybeSignal` | `false` | Whether to show left arrow. |
-| left_text | `MaybeSignal` | `Default::default()` | NavBar left text. |
+| left_text | `OptionalProp>` | `Default::default()` | NavBar left text. |
| on_click_left | `Option>` | `Default::default()` | NavBar left click. |
-| right_text | `MaybeSignal` | `Default::default()` | NavBar right text. |
+| right_text | `OptionalProp>` | `Default::default()` | NavBar right text. |
| on_click_right | `Option>` | `Default::default()` | NavBar right click. |
### NavBarLeft and NavBarRight Props
-| Name | Type | Default | Description |
-| --- | --- | --- | --- |
-| class | `MaybeSignal` | `Default::default()` | Addtional classes for the element. |
+| Name | Type | Default | Description |
+| ----- | ----------------------------------- | -------------------- | ---------------------------------- |
+| class | `OptionalProp>` | `Default::default()` | Addtional classes for the element. |
diff --git a/demo_markdown/docs/_mobile/tabbar/mod.md b/demo_markdown/docs/_mobile/tabbar/mod.md
index f145a90..ea8305d 100644
--- a/demo_markdown/docs/_mobile/tabbar/mod.md
+++ b/demo_markdown/docs/_mobile/tabbar/mod.md
@@ -21,10 +21,10 @@ view! {
### Tabbar Props
-| Name | Type | Default | Description |
-| -------- | ------------------ | -------------------- | ----------------- |
-| value | `RwSignal` | `Default::default()` | Tabbar's value. |
-| children | `Children` | | Tabbar's content. |
+| Name | Type | Default | Description |
+| -------- | --------------- | -------------------- | ----------------- |
+| value | `Model` | `Default::default()` | Tabbar's value. |
+| children | `Children` | | Tabbar's content. |
### TabbarItem Props
diff --git a/demo_markdown/docs/alert/mod.md b/demo_markdown/docs/alert/mod.md
index 2bfc410..1241d24 100644
--- a/demo_markdown/docs/alert/mod.md
+++ b/demo_markdown/docs/alert/mod.md
@@ -18,9 +18,9 @@ view! {
### Alert Props
-| Name | Type | Default | Description |
-| -------- | --------------------------- | -------------------- | ----------------------------------------- |
-| class | `MaybeSignal` | `Default::default()` | Additional classes for the alert element. |
-| title | `MaybeSignal` | `Default::default()` | Title of the alert. |
-| variant | `MaybeSignal` | | Alert variant. |
-| children | `Children` | | The content of the alert. |
+| Name | Type | Default | Description |
+| -------- | ----------------------------------- | -------------------- | ----------------------------------------- |
+| class | `OptionalProp>` | `Default::default()` | Additional classes for the alert element. |
+| title | `Option>` | `Default::default()` | Title of the alert. |
+| variant | `MaybeSignal` | | Alert variant. |
+| children | `Children` | | The content of the alert. |
diff --git a/demo_markdown/docs/auto_complete/mod.md b/demo_markdown/docs/auto_complete/mod.md
index 9fa5d96..7f12129 100644
--- a/demo_markdown/docs/auto_complete/mod.md
+++ b/demo_markdown/docs/auto_complete/mod.md
@@ -60,9 +60,9 @@ view! {
| Name | Type | Default | Description |
| --- | --- | --- | --- |
-| class | `MaybeSignal` | `Default::default()` | Additional classes for the autocomplete element. |
-| value | `RwSignal` | `Default::default()` | Input of autocomplete. |
-| placeholder | `RwSignal` | `Default::default()` | Autocomplete's placeholder. |
+| class | `OptionalProp>` | `Default::default()` | Additional classes for the autocomplete element. |
+| value | `Model` | `Default::default()` | Input of autocomplete. |
+| placeholder | `OptionalProp>` | `Default::default()` | Autocomplete's placeholder. |
| options | `MaybeSignal>` | `Default::default()` | Options to autocomplete from. |
| disabled | `MaybeSignal` | `false` | Whether the input is disabled. |
| invalid | `MaybeSignal` | `false` | Whether the input is invalid. |
diff --git a/demo_markdown/docs/avatar/mod.md b/demo_markdown/docs/avatar/mod.md
index f9ec9bd..117633c 100644
--- a/demo_markdown/docs/avatar/mod.md
+++ b/demo_markdown/docs/avatar/mod.md
@@ -12,9 +12,9 @@ view! {
### Avatar Props
-| Name | Type | Default | Description |
-| ----- | --------------------- | -------------------- | ----------------------------------------- |
-| class | `MaybeSignal` | `Default::default()` | Addtional classes for the avatar element. |
-| src | `MaybeSignal` | `Default::default()` | Avatar's image source. |
-| round | `MaybeSignal` | `false` | Whether to display a rounded avatar. |
-| size | `MaybeSignal` | `30` | Avatar's size. |
+| Name | Type | Default | Description |
+| ----- | ----------------------------------- | -------------------- | ----------------------------------------- |
+| class | `OptionalProp>` | `Default::default()` | Addtional classes for the avatar element. |
+| src | `Option>` | `Default::default()` | Avatar's image source. |
+| round | `MaybeSignal` | `false` | Whether to display a rounded avatar. |
+| size | `MaybeSignal` | `30` | Avatar's size. |
diff --git a/demo_markdown/docs/badge/mod.md b/demo_markdown/docs/badge/mod.md
index 6a3775e..72365a0 100644
--- a/demo_markdown/docs/badge/mod.md
+++ b/demo_markdown/docs/badge/mod.md
@@ -36,7 +36,7 @@ view! {
| Name | Type | Default | Description |
| --- | --- | --- | --- |
-| class | `MaybeSignal` | `Default::default()` | Addtional classes for the badge element. |
+| class | `OptionalProp>` | `Default::default()` | Addtional classes for the badge element. |
| value | `MaybeSignal` | `0` | Badge's value. |
| max | `MaybeSignal` | `u32::MAX` | The maximum number of the badge when its value overflows. |
| variant | `MaybeSignal` | `BadgeVariant::Error` | Badge variant. |
diff --git a/demo_markdown/docs/breadcrumb/mod.md b/demo_markdown/docs/breadcrumb/mod.md
index c57bc54..b0726ca 100644
--- a/demo_markdown/docs/breadcrumb/mod.md
+++ b/demo_markdown/docs/breadcrumb/mod.md
@@ -24,15 +24,15 @@ view! {
### Breadcrumb Props
-| Name | Type | Default | Description |
-| --------- | --------------------- | -------------------- | --------------------------------------------- |
-| class | `MaybeSignal` | `Default::default()` | Addtional classes for the breadcrumb element. |
-| separator | `MaybeSignal` | `/` | Breadcrumb separator. |
-| children | `Children` | | Breadcrumb's content. |
+| Name | Type | Default | Description |
+| --- | --- | --- | --- |
+| class | `OptionalProp>` | `Default::default()` | Addtional classes for the breadcrumb element. |
+| separator | `MaybeSignal` | `/` | Breadcrumb separator. |
+| children | `Children` | | Breadcrumb's content. |
### BreadcrumbItem Props
-| Name | Type | Default | Description |
-| -------- | --------------------- | -------------------- | -------------------------------------------------- |
-| class | `MaybeSignal` | `Default::default()` | Addtional classes for the breadcrumb link element. |
-| children | `Children` | | BreadcrumbItem's content. |
+| Name | Type | Default | Description |
+| --- | --- | --- | --- |
+| class | `OptionalProp>` | `Default::default()` | Addtional classes for the breadcrumb link element. |
+| children | `Children` | | BreadcrumbItem's content. |
diff --git a/demo_markdown/docs/button/mod.md b/demo_markdown/docs/button/mod.md
index ae8c087..8f3cffd 100644
--- a/demo_markdown/docs/button/mod.md
+++ b/demo_markdown/docs/button/mod.md
@@ -129,8 +129,8 @@ view! {
| Name | Type | Default | Description |
| --- | --- | --- | --- |
-| class | `MaybeSignal` | `Default::default()` | Additional classes for the button element. |
-| style | `MaybeSignal` | `Default::default()` | Button's style. |
+| class | `OptionalProp>` | `Default::default()` | Additional classes for the button element. |
+| style | `Option>` | `Default::default()` | Button's style. |
| variant | `MaybeSignal` | `ButtonVariant::Primary` | Button's variant. |
| color | `MaybeSignal` | `ButtonColor::Primary` | Button's color. |
| round | `MaybeSignal` | `false` | Whether the button shows rounded corners. |
@@ -140,4 +140,11 @@ view! {
| disabled | `MaybeSignal` | `false` | Whether the button is disabled. |
| size | `MaybeSignal` | `ButtonSize::Medium` | Button size. |
| on_click | `Option>` | `None` | Listen for button click events. |
-| children | `Children` | | Button's content. |
+| children | `Option` | | Button's content. |
+
+### ButtonGroup props
+
+| Name | Type | Default | Description |
+| -------- | ---------- | ------- | ----------------------------------- |
+| vertical | `bool` | `false` | Directions of buttons in the group. |
+| children | `Children` | | ButtonGroup's content. |
diff --git a/demo_markdown/docs/calendar/mod.md b/demo_markdown/docs/calendar/mod.md
index bc5c995..d5a0c09 100644
--- a/demo_markdown/docs/calendar/mod.md
+++ b/demo_markdown/docs/calendar/mod.md
@@ -11,7 +11,7 @@ view! {
### Calendar Props
-| Name | Type | Default | Desciption |
-| ----- | ----------------------------- | -------------------- | ------------------------------------------- |
-| class | `MaybeSignal` | `Default::default()` | Addtional classes for the calendar element. |
-| value | `RwSignal