mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
feat(toast-notification): add fullWidth
prop
This commit is contained in:
parent
06777ba803
commit
cfcd7f4eb1
1 changed files with 7 additions and 0 deletions
|
@ -33,6 +33,12 @@
|
|||
/** Set to `true` to hide the close button */
|
||||
export let hideCloseButton = false;
|
||||
|
||||
/**
|
||||
* Set to `true` for the notification to span
|
||||
* the full width of its containing element.
|
||||
*/
|
||||
export let fullWidth = false;
|
||||
|
||||
import { createEventDispatcher, onMount } from "svelte";
|
||||
import NotificationButton from "./NotificationButton.svelte";
|
||||
import NotificationIcon from "./NotificationIcon.svelte";
|
||||
|
@ -78,6 +84,7 @@
|
|||
class:bx--toast-notification--warning="{kind === 'warning'}"
|
||||
class:bx--toast-notification--warning-alt="{kind === 'warning-alt'}"
|
||||
{...$$restProps}
|
||||
style="{fullWidth && 'width: 100%;'}{$$restProps.style}"
|
||||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue