feat: make renderIcon/icon prop consistent (#496)

This commit is contained in:
Eric Liu 2021-01-27 14:16:07 -08:00 committed by GitHub
commit 63ef51209d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 67 additions and 67 deletions

View file

@ -9,15 +9,15 @@
export let href = 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 anchor element */
export let ref = null;
import { Icon } from "../../Icon";
import Icon from "../../Icon/Icon.svelte";
</script>
<style>
@ -39,5 +39,5 @@
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
{...$$restProps}
>
<Icon {...icon} />
<Icon render="{icon}" />
</a>