mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(toggle): support small size, deprecate ToggleSmall
This commit is contained in:
parent
b00e4316fd
commit
1e3eef992c
12 changed files with 91 additions and 17 deletions
|
@ -8956,6 +8956,16 @@
|
|||
"moduleName": "Toggle",
|
||||
"filePath": "/src/Toggle/Toggle.svelte",
|
||||
"props": [
|
||||
{
|
||||
"name": "size",
|
||||
"kind": "let",
|
||||
"description": "Specify the toggle size",
|
||||
"type": "\"default\" | \"sm\"",
|
||||
"value": "\"default\"",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "toggled",
|
||||
"kind": "let",
|
||||
|
@ -9044,6 +9054,16 @@
|
|||
"moduleName": "ToggleSkeleton",
|
||||
"filePath": "/src/Toggle/ToggleSkeleton.svelte",
|
||||
"props": [
|
||||
{
|
||||
"name": "size",
|
||||
"kind": "let",
|
||||
"description": "Specify the toggle size",
|
||||
"type": "\"default\" | \"sm\"",
|
||||
"value": "\"default\"",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "labelText",
|
||||
"kind": "let",
|
||||
|
|
|
@ -27,7 +27,7 @@ let comment = `
|
|||
`
|
||||
</script>
|
||||
|
||||
<InlineNotification svx-ignore lowContrast title="Note:" subtitle="By design, the copy button does not copy text to the clipboard. You will need to write your own logic." kind="info" hideCloseButton />
|
||||
<InlineNotification svx-ignore title="Note:" subtitle="By design, the copy button does not copy text to the clipboard. You will need to write your own logic." kind="info" hideCloseButton />
|
||||
|
||||
### Default (single-line)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
<InlineNotification svx-ignore lowContrast title="Note:" subtitle="By design, the copy button does not copy text to the clipboard. You will need to write your own logic." kind="info" hideCloseButton />
|
||||
<InlineNotification svx-ignore title="Note:" subtitle="By design, the copy button does not copy text to the clipboard. You will need to write your own logic." kind="info" hideCloseButton />
|
||||
|
||||
### Default
|
||||
|
||||
|
|
|
@ -23,6 +23,14 @@ components: ["Toggle", "ToggleSkeleton"]
|
|||
|
||||
<Toggle labelText="Push notifications" disabled />
|
||||
|
||||
### Small size
|
||||
|
||||
<Toggle size="sm" labelText="Push notifications" />
|
||||
|
||||
### Skeleton
|
||||
|
||||
<ToggleSkeleton />
|
||||
<ToggleSkeleton />
|
||||
|
||||
### Skeleton (small)
|
||||
|
||||
<ToggleSkeleton size="sm" />
|
|
@ -3,10 +3,16 @@ components: ["ToggleSmall", "ToggleSmallSkeleton"]
|
|||
---
|
||||
|
||||
<script>
|
||||
import { ToggleSmall, ToggleSmallSkeleton } from "carbon-components-svelte";
|
||||
import { ToggleSmall, ToggleSmallSkeleton, InlineNotification, Link } from "carbon-components-svelte";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
<InlineNotification svx-ignore title="Deprecation warning" kind="warning" hideCloseButton>
|
||||
<div>
|
||||
This component will be removed in version 1.0.0. Use the <Link href="/components/Toggle#small-size">Toggle small variant</Link> instead.
|
||||
</div>
|
||||
</InlineNotification>
|
||||
|
||||
### Default (untoggled)
|
||||
|
||||
<ToggleSmall labelText="Push notifications" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue