feat(icon): deprecate Icon, IconSkeleton

This commit is contained in:
Eric Y Liu 2021-03-12 16:04:42 -08:00
commit de348f0a8c
3 changed files with 18 additions and 1 deletions

View file

@ -1,5 +1,5 @@
<script> <script>
import { Icon } from "carbon-components-svelte"; import { Icon, InlineNotification, OutboundLink } from "carbon-components-svelte";
import Add16 from "carbon-icons-svelte/lib/Add16"; import Add16 from "carbon-icons-svelte/lib/Add16";
import Add20 from "carbon-icons-svelte/lib/Add20"; import Add20 from "carbon-icons-svelte/lib/Add20";
import Add24 from "carbon-icons-svelte/lib/Add24"; import Add24 from "carbon-icons-svelte/lib/Add24";
@ -7,6 +7,12 @@
import Preview from "../../components/Preview.svelte"; import Preview from "../../components/Preview.svelte";
</script> </script>
<InlineNotification svx-ignore 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/IBM/carbon-icons-svelte">carbon-icons-svelte</OutboundLink> instead.
</div>
</InlineNotification>
### Default ### Default
<Icon render={Add16} /> <Icon render={Add16} />

View file

@ -1,4 +1,10 @@
<script> <script>
/**
* @deprecated
* This component will be removed in version 1.0.0.
* Use icons from "carbon-icons-svelte" instead
*/
/** /**
* @extends {"./IconSkeleton"} IconSkeletonProps * @extends {"./IconSkeleton"} IconSkeletonProps
* @restProps {svg} * @restProps {svg}

View file

@ -1,4 +1,9 @@
<script> <script>
/**
* @deprecated
* This component will be removed in version 1.0.0.
*/
/** Set the size of the icon */ /** Set the size of the icon */
export let size = 16; export let size = 16;
</script> </script>