mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
breaking: remove deprecated props and components (#1191)
This commit is contained in:
parent
ea7c0d446e
commit
21714d0e3a
55 changed files with 127 additions and 1823 deletions
|
@ -18,7 +18,7 @@
|
|||
import LogoGithub20 from "carbon-icons-svelte/lib/LogoGithub20";
|
||||
import Theme from "../components/Theme.svelte";
|
||||
|
||||
const deprecated = ["ToggleSmall", "Icon"];
|
||||
const deprecated = [];
|
||||
const new_components = [];
|
||||
|
||||
let isOpen = false;
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
<script>
|
||||
import { Icon, InlineNotification, OutboundLink } from "carbon-components-svelte";
|
||||
import Add16 from "carbon-icons-svelte/lib/Add16";
|
||||
import Add20 from "carbon-icons-svelte/lib/Add20";
|
||||
import Add24 from "carbon-icons-svelte/lib/Add24";
|
||||
import Add32 from "carbon-icons-svelte/lib/Add32";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
<InlineNotification svx-ignore lowContrast title="Deprecation warning" kind="warning" hideCloseButton>
|
||||
<div>
|
||||
This component will be removed in the next major release. Use icons from <OutboundLink href="https://github.com/carbon-design-system/carbon-icons-svelte">carbon-icons-svelte</OutboundLink> instead.
|
||||
</div>
|
||||
</InlineNotification>
|
||||
|
||||
### Default
|
||||
|
||||
<Icon render={Add16} />
|
||||
<Icon render={Add20} />
|
||||
<Icon render={Add24} />
|
||||
<Icon render={Add32} />
|
||||
|
||||
### Skeleton
|
||||
|
||||
<Icon skeleton render={Add16} />
|
||||
<Icon skeleton size={20} render={Add20} />
|
||||
<Icon skeleton size={24} render={Add24} />
|
||||
<Icon skeleton size={32} render={Add32} />
|
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
components: ["ToggleSmall", "ToggleSmallSkeleton"]
|
||||
---
|
||||
|
||||
<script>
|
||||
import { ToggleSmall, ToggleSmallSkeleton, InlineNotification, Link } from "carbon-components-svelte";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
<InlineNotification svx-ignore lowContrast title="Deprecation warning" kind="warning" hideCloseButton>
|
||||
<div>
|
||||
This component will be removed in the next major release. Use the <Link href="/components/Toggle#small-size">Toggle small variant</Link> instead.
|
||||
</div>
|
||||
</InlineNotification>
|
||||
|
||||
### Default (untoggled)
|
||||
|
||||
<ToggleSmall labelText="Push notifications" />
|
||||
|
||||
### Toggled
|
||||
|
||||
<ToggleSmall labelText="Push notifications" toggled />
|
||||
|
||||
### Custom labels
|
||||
|
||||
<ToggleSmall labelText="Push notifications" labelA="No" labelB="Yes" />
|
||||
|
||||
### Disabled
|
||||
|
||||
<ToggleSmall labelText="Push notifications" disabled />
|
||||
|
||||
### Skeleton
|
||||
|
||||
<ToggleSmallSkeleton />
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { ToggleSmall, CodeSnippet } from "carbon-components-svelte";
|
||||
import { Toggle, CodeSnippet } from "carbon-components-svelte";
|
||||
|
||||
let toggled = false;
|
||||
|
||||
|
@ -7,9 +7,10 @@
|
|||
$: code = Array.from({ length }, (_, i) => i + 1).join("\n");
|
||||
</script>
|
||||
|
||||
<ToggleSmall
|
||||
style="margin-bottom: var(--cds-spacing-05)"
|
||||
labelText="Trigger snippet overflow"
|
||||
<Toggle
|
||||
bind:toggled
|
||||
size="sm"
|
||||
labelText="Trigger snippet overflow"
|
||||
style="margin-bottom: var(--cds-spacing-05)"
|
||||
/>
|
||||
<CodeSnippet type="multi" code="{code}" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue