docs: alert and auto complete

This commit is contained in:
luoxiao 2023-11-13 22:03:44 +08:00
parent 7327a421c3
commit f6868418ae
2 changed files with 97 additions and 1 deletions

View file

@ -35,6 +35,37 @@ pub fn AlertPage() -> impl IntoView {
"" ""
</DemoCode> </DemoCode>
</Demo> </Demo>
<h3>"Alert 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>"title"</td>
<td>"MaybeSignal<String>"</td>
<td>r#""""#</td>
<td>"Title of the alert."</td>
</tr>
<tr>
<td>"variant"</td>
<td>"AlertVariant"</td>
<td></td>
<td>"Alert variant."</td>
</tr>
<tr>
<td>"children"</td>
<td>"Children"</td>
<td></td>
<td>"The content of the alert."</td>
</tr>
</tbody>
</Table>
</div> </div>
} }
} }

View file

@ -22,7 +22,7 @@ pub fn AutoCompletePage() -> impl IntoView {
view! { view! {
<div style="width: 896px; margin: 0 auto;"> <div style="width: 896px; margin: 0 auto;">
<h1>"Auto Complete"</h1> <h1>"AutoComplete"</h1>
<Demo> <Demo>
<AutoComplete value options placeholder="Email"/> <AutoComplete value options placeholder="Email"/>
<DemoCode <DemoCode
@ -54,6 +54,71 @@ pub fn AutoCompletePage() -> impl IntoView {
"" ""
</DemoCode> </DemoCode>
</Demo> </Demo>
<h3>"AutoComplete 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>"Input of autocomplete."</td>
</tr>
<tr>
<td>"placeholder"</td>
<td>"MaybeSignal<String>"</td>
<td>r#""""#</td>
<td>"Autocomplete's placeholder."</td>
</tr>
<tr>
<td>"options"</td>
<td>"MaybeSignal<Vec<AutoCompleteOption>>"</td>
<td>"Vec::new()"</td>
<td>"Options to autocomplete from."</td>
</tr>
<tr>
<td>"clear_after_select"</td>
<td>"MaybeSignal<bool>"</td>
<td>"false"</td>
<td>"Whether to clear after selection."</td>
</tr>
<tr>
<td>"on_select"</td>
<td>"Option<Callback<String>>"</td>
<td>"None"</td>
<td>"On select callback function."</td>
</tr>
</tbody>
</Table>
<h3>"AutoCompleteOption Properties"</h3>
<Table single_column=true>
<thead>
<tr>
<th>"Name"</th>
<th>"Type"</th>
<th>"Description"</th>
</tr>
</thead>
<tbody>
<tr>
<td>"value"</td>
<td>"String"</td>
<td>"Option ID."</td>
</tr>
<tr>
<td>"label"</td>
<td>"String"</td>
<td>"Option label value."</td>
</tr>
</tbody>
</Table>
</div> </div>
} }
} }