carbon-components-svelte/src/components/Notification/Notification.Story.svelte
2019-12-20 18:56:56 -08:00

20 lines
664 B
Svelte

<script>
export let story = undefined;
import Layout from '../../internal/ui/Layout.svelte';
import InlineNotification from './InlineNotification.svelte';
import ToastNotification from './ToastNotification.svelte';
import NotificationActionButton from './NotificationActionButton.svelte';
</script>
<Layout>
{#if story === 'inline'}
<InlineNotification {...$$props}>
<div slot="actions">
<NotificationActionButton>{$$props.action}</NotificationActionButton>
</div>
</InlineNotification>
{:else if story === 'toast'}
<ToastNotification {...$$props} style="min-width: 30rem; margin-bottom: .5rem" />
{/if}
</Layout>