mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat: make renderIcon/icon prop consistent (#496)
This commit is contained in:
parent
f2a3f8d2e1
commit
63ef51209d
13 changed files with 67 additions and 67 deletions
|
@ -9,16 +9,16 @@
|
|||
export let text = undefined;
|
||||
|
||||
/**
|
||||
* Specify the icon props
|
||||
* @type {{ render: import("carbon-icons-svelte").CarbonIcon; skeleton: boolean; }}
|
||||
* Specify the icon from `carbon-icons-svelte` to render
|
||||
* @type {typeof import("carbon-icons-svelte").CarbonIcon}
|
||||
*/
|
||||
export let icon = undefined;
|
||||
|
||||
/** Obtain a reference to the HTML button element */
|
||||
export let ref = null;
|
||||
|
||||
import ChevronDown16 from "carbon-icons-svelte/lib/ChevronDown16";
|
||||
import { Icon } from "../../Icon";
|
||||
import ChevronDown16 from "carbon-icons-svelte/lib/ChevronDown16/ChevronDown16.svelte";
|
||||
import Icon from "../../Icon/Icon.svelte";
|
||||
</script>
|
||||
|
||||
<li class:bx--side-nav__item="{true}" class:bx--side-nav__item--icon="{icon}">
|
||||
|
@ -35,7 +35,7 @@
|
|||
>
|
||||
{#if icon}
|
||||
<div class:bx--side-nav__icon="{true}">
|
||||
<Icon {...icon} />
|
||||
<Icon render="{icon}" />
|
||||
</div>
|
||||
{/if}
|
||||
<span class:bx--side-nav__submenu-title="{true}">{text}</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue