fix(notification): remove notificationType prop

This commit is contained in:
Eric Liu 2021-01-22 12:05:46 -08:00
commit ca1208f6cb
6 changed files with 25 additions and 77 deletions

View file

@ -1,10 +1,4 @@
<script>
/**
* Set the type of notification
* @type {"toast" | "inline"}
*/
export let notificationType = "inline";
/**
* Specify the kind of notification
* @type {"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"}
@ -79,14 +73,14 @@
>
<div class:bx--inline-notification__details="{true}">
<NotificationIcon
notificationType="{notificationType}"
notificationType="inline"
kind="{kind}"
iconDescription="{iconDescription}"
/>
<NotificationTextDetails
title="{title}"
subtitle="{subtitle}"
notificationType="{notificationType}"
notificationType="inline"
>
<slot />
</NotificationTextDetails>
@ -95,7 +89,7 @@
{#if !hideCloseButton}
<NotificationButton
iconDescription="{iconDescription}"
notificationType="{notificationType}"
notificationType="inline"
on:click="{close}"
/>
{/if}

View file

@ -1,10 +1,4 @@
<script>
/**
* Set the type of notification
* @type {"toast" | "inline"}
*/
export let notificationType = "toast";
/**
* Specify the kind of notification
* @type {"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"}
@ -79,23 +73,17 @@
on:mouseenter
on:mouseleave
>
<NotificationIcon
notificationType="{notificationType}"
kind="{kind}"
iconDescription="{iconDescription}"
/>
<NotificationIcon kind="{kind}" iconDescription="{iconDescription}" />
<NotificationTextDetails
title="{title}"
subtitle="{subtitle}"
caption="{caption}"
notificationType="{notificationType}"
>
<slot />
</NotificationTextDetails>
{#if !hideCloseButton}
<NotificationButton
iconDescription="{iconDescription}"
notificationType="{notificationType}"
on:click="{close}"
/>
{/if}