mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
parent
422ac528a7
commit
94dceae1fb
11 changed files with 309 additions and 2 deletions
25
src/components/Notification/NotificationTextDetails.svelte
Normal file
25
src/components/Notification/NotificationTextDetails.svelte
Normal file
|
@ -0,0 +1,25 @@
|
|||
<script>
|
||||
export let title = 'title';
|
||||
export let subtitle = '';
|
||||
export let caption = 'caption';
|
||||
export let notificationType = 'toast';
|
||||
|
||||
import { cx } from '../../lib';
|
||||
</script>
|
||||
|
||||
{#if notificationType === 'toast'}
|
||||
<div class={cx('--toast-notification__details')}>
|
||||
<h3 class={cx('--toast-notification__title')}>{title}</h3>
|
||||
<div class={cx('--toast-notification__subtitle')}>{subtitle}</div>
|
||||
<div class={cx('--toast-notification__caption')}>{caption}</div>
|
||||
<slot />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if notificationType === 'inline'}
|
||||
<div class={cx('--inline-notification__text-wrapper')}>
|
||||
<p class={cx('--inline-notification__title')}>{title}</p>
|
||||
<div class={cx('--inline-notification__subtitle')}>{subtitle}</div>
|
||||
<slot />
|
||||
</div>
|
||||
{/if}
|
Loading…
Add table
Add a link
Reference in a new issue