mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(toast-notification): add fullWidth
prop (#1444)
* feat(toast-notification): add `fullWidth` prop * Run "yarn build:docs" * test(toast-notification): assert `fullWidth` prop * docs(toast-notification): add "Full width" example
This commit is contained in:
parent
b04a281939
commit
8fea168ffd
6 changed files with 45 additions and 12 deletions
|
@ -13386,6 +13386,18 @@
|
|||
"isRequired": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "fullWidth",
|
||||
"kind": "let",
|
||||
"description": "Set to `true` for the notification to span\nthe full width of its containing element.",
|
||||
"type": "boolean",
|
||||
"value": "false",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"isRequired": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
}
|
||||
],
|
||||
"moduleExports": [],
|
||||
|
|
|
@ -26,6 +26,12 @@ source: Notification/ToastNotification.svelte
|
|||
// custom close logic (e.g., transitions)
|
||||
}} />
|
||||
|
||||
### Full width
|
||||
|
||||
Set `fullWidth` to `true` for the notification to span the full width of its containing element.
|
||||
|
||||
<ToastNotification fullWidth title="Error" subtitle="An internal server error occurred." caption="{new Date().toLocaleString()}" />
|
||||
|
||||
### Slottable title, subtitle, caption
|
||||
|
||||
<ToastNotification>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue