mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
docs: add new component docs
This commit is contained in:
parent
c2fb2d213d
commit
2008d0035f
130 changed files with 6662 additions and 3801 deletions
53
docs/src/pages/components/ComboBox.svx
Normal file
53
docs/src/pages/components/ComboBox.svx
Normal file
|
@ -0,0 +1,53 @@
|
|||
<script>
|
||||
import { ComboBox } from "carbon-components-svelte";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
### Default
|
||||
|
||||
<ComboBox titleText="Contact" placeholder="Select contact method"
|
||||
items={[
|
||||
{id: "0", text: "Slack"},
|
||||
{id: "1", text: "Email"},
|
||||
{id: "2", text: "Fax"}
|
||||
]} />
|
||||
|
||||
### Selected index
|
||||
|
||||
<ComboBox titleText="Contact" placeholder="Select contact method"
|
||||
selectedIndex={1}
|
||||
items={[
|
||||
{id: "0", text: "Slack"},
|
||||
{id: "1", text: "Email"},
|
||||
{id: "2", text: "Fax"}
|
||||
]} />
|
||||
|
||||
### Extra-large size
|
||||
|
||||
<ComboBox titleText="Contact" placeholder="Select contact method"
|
||||
size="xl"
|
||||
items={[
|
||||
{id: "0", text: "Slack"},
|
||||
{id: "1", text: "Email"},
|
||||
{id: "2", text: "Fax"}
|
||||
]} />
|
||||
|
||||
### Small size
|
||||
|
||||
<ComboBox titleText="Contact" placeholder="Select contact method"
|
||||
size="sm"
|
||||
items={[
|
||||
{id: "0", text: "Slack"},
|
||||
{id: "1", text: "Email"},
|
||||
{id: "2", text: "Fax"}
|
||||
]} />
|
||||
|
||||
### Disabled
|
||||
|
||||
<ComboBox titleText="Contact" placeholder="Select contact method"
|
||||
disabled
|
||||
items={[
|
||||
{id: "0", text: "Slack"},
|
||||
{id: "1", text: "Email"},
|
||||
{id: "2", text: "Fax"}
|
||||
]} />
|
Loading…
Add table
Add a link
Reference in a new issue