mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 03:49:34 +00:00
feat(tag): support custom icon variant
This commit is contained in:
parent
0c8393637a
commit
b2560a21ac
6 changed files with 46 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
|||
<script>
|
||||
import { Tag } from "carbon-components-svelte";
|
||||
import IbmCloud16 from "carbon-icons-svelte/lib/IbmCloud16";
|
||||
import Document16 from "carbon-icons-svelte/lib/Document16";
|
||||
import Preview from "../../components/Preview.svelte";
|
||||
</script>
|
||||
|
||||
|
@ -25,6 +27,13 @@
|
|||
|
||||
<Tag filter on:click>Filterable</Tag>
|
||||
|
||||
### Custom icon
|
||||
|
||||
Note: rendering a custom icon cannnot be used with the filterable variant.
|
||||
|
||||
<Tag icon={IbmCloud16}>IBM Cloud</Tag>
|
||||
<Tag icon={Document16} type="blue">API documentation</Tag>
|
||||
|
||||
### Skeleton
|
||||
|
||||
<Tag skeleton />
|
Loading…
Add table
Add a link
Reference in a new issue