chore: lift components folder

This commit is contained in:
Eric Liu 2020-07-19 09:06:08 -07:00
commit 2200b29b92
301 changed files with 57 additions and 76 deletions

View file

@ -0,0 +1,27 @@
<script>
export let notificationType = "toast"; // "toast" | "inline"
export let iconDescription = "close icon";
export let renderIcon = Close20;
export let title = undefined;
export let type = "button";
import Close20 from "carbon-icons-svelte/lib/Close20";
</script>
<button
aria-label={iconDescription}
title={iconDescription}
{type}
class:bx--toast-notification__close-button={notificationType === 'toast'}
class:bx--inline-notification__close-button={notificationType === 'inline'}
{...$$restProps}
on:click
on:mouseover
on:mouseenter
on:mouseleave>
<svelte:component
this={renderIcon}
{title}
class="{notificationType === 'toast' && 'bx--toast-notification__close-icon'}
{notificationType === 'inline' && 'bx--inline-notification__close-icon'}" />
</button>