mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
refactor: remove usage of deprecated Icon
component (#1160)
This commit is contained in:
parent
cb014219fd
commit
e2c980e23a
2 changed files with 6 additions and 6 deletions
|
@ -39,7 +39,6 @@
|
|||
import { slide } from "svelte/transition";
|
||||
import Close20 from "../../icons/Close20.svelte";
|
||||
import AppSwitcher20 from "../../icons/AppSwitcher20.svelte";
|
||||
import Icon from "../../Icon/Icon.svelte";
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
|
@ -69,8 +68,11 @@
|
|||
dispatch(isOpen ? 'open' : 'close');
|
||||
}}"
|
||||
>
|
||||
<Icon render="{icon}" style="{isOpen ? 'display: none' : ''}" />
|
||||
<Icon render="{closeIcon}" style="{!isOpen ? 'display: none' : ''}" />
|
||||
<svelte:component this="{icon}" style="{isOpen ? 'display: none' : ''}" />
|
||||
<svelte:component
|
||||
this="{closeIcon}"
|
||||
style="{!isOpen ? 'display: none' : ''}"
|
||||
/>
|
||||
<slot name="text">
|
||||
{#if text}<span>{text}</span>{/if}
|
||||
</slot>
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
/** Obtain a reference to the HTML anchor element */
|
||||
export let ref = null;
|
||||
|
||||
import Icon from "../../Icon/Icon.svelte";
|
||||
</script>
|
||||
|
||||
<a
|
||||
|
@ -29,7 +27,7 @@
|
|||
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||
{...$$restProps}
|
||||
>
|
||||
<Icon render="{icon}" />
|
||||
<svelte:component this="{icon}" />
|
||||
</a>
|
||||
|
||||
<style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue