mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
fix(notification): remove notificationType prop
This commit is contained in:
parent
abb19ca10c
commit
ca1208f6cb
6 changed files with 25 additions and 77 deletions
|
@ -1735,17 +1735,16 @@ None.
|
|||
|
||||
### Props
|
||||
|
||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||
| :--------------- | :--------------- | :------- | :------------------------------------------------------------------------------------------------------------- | ---------------------------------- | ----------------------------------------------------------------------- |
|
||||
| notificationType | <code>let</code> | No | <code>"toast" | "inline"</code> | <code>"inline"</code> | Set the type of notification |
|
||||
| kind | <code>let</code> | No | <code>"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"</code> | <code>"error"</code> | Specify the kind of notification |
|
||||
| lowContrast | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use the low contrast variant |
|
||||
| timeout | <code>let</code> | No | <code>number</code> | <code>0</code> | Set the timeout duration (ms) to hide the notification after opening it |
|
||||
| role | <code>let</code> | No | <code>string</code> | <code>"alert"</code> | Set the `role` attribute |
|
||||
| title | <code>let</code> | No | <code>string</code> | <code>"Title"</code> | Specify the title text |
|
||||
| subtitle | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the subtitle text |
|
||||
| hideCloseButton | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to hide the close button |
|
||||
| iconDescription | <code>let</code> | No | <code>string</code> | <code>"Closes notification"</code> | Specify the ARIA label for the icon |
|
||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||
| :-------------- | :--------------- | :------- | :------------------------------------------------------------------------------------------------------------- | ---------------------------------- | ----------------------------------------------------------------------- |
|
||||
| kind | <code>let</code> | No | <code>"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"</code> | <code>"error"</code> | Specify the kind of notification |
|
||||
| lowContrast | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use the low contrast variant |
|
||||
| timeout | <code>let</code> | No | <code>number</code> | <code>0</code> | Set the timeout duration (ms) to hide the notification after opening it |
|
||||
| role | <code>let</code> | No | <code>string</code> | <code>"alert"</code> | Set the `role` attribute |
|
||||
| title | <code>let</code> | No | <code>string</code> | <code>"Title"</code> | Specify the title text |
|
||||
| subtitle | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the subtitle text |
|
||||
| hideCloseButton | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to hide the close button |
|
||||
| iconDescription | <code>let</code> | No | <code>string</code> | <code>"Closes notification"</code> | Specify the ARIA label for the icon |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -3873,18 +3872,17 @@ None.
|
|||
|
||||
### Props
|
||||
|
||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||
| :--------------- | :--------------- | :------- | :------------------------------------------------------------------------------------------------------------- | ---------------------------------- | ----------------------------------------------------------------------- |
|
||||
| notificationType | <code>let</code> | No | <code>"toast" | "inline"</code> | <code>"toast"</code> | Set the type of notification |
|
||||
| kind | <code>let</code> | No | <code>"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"</code> | <code>"error"</code> | Specify the kind of notification |
|
||||
| lowContrast | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use the low contrast variant |
|
||||
| timeout | <code>let</code> | No | <code>number</code> | <code>0</code> | Set the timeout duration (ms) to hide the notification after opening it |
|
||||
| role | <code>let</code> | No | <code>string</code> | <code>"alert"</code> | Set the `role` attribute |
|
||||
| title | <code>let</code> | No | <code>string</code> | <code>"Title"</code> | Specify the title text |
|
||||
| subtitle | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the subtitle text |
|
||||
| caption | <code>let</code> | No | <code>string</code> | <code>"Caption"</code> | Specify the caption text |
|
||||
| iconDescription | <code>let</code> | No | <code>string</code> | <code>"Closes notification"</code> | Specify the ARIA label for the icon |
|
||||
| hideCloseButton | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to hide the close button |
|
||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||
| :-------------- | :--------------- | :------- | :------------------------------------------------------------------------------------------------------------- | ---------------------------------- | ----------------------------------------------------------------------- |
|
||||
| kind | <code>let</code> | No | <code>"error" | "info" | "info-square" | "success" | "warning" | "warning-alt"</code> | <code>"error"</code> | Specify the kind of notification |
|
||||
| lowContrast | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use the low contrast variant |
|
||||
| timeout | <code>let</code> | No | <code>number</code> | <code>0</code> | Set the timeout duration (ms) to hide the notification after opening it |
|
||||
| role | <code>let</code> | No | <code>string</code> | <code>"alert"</code> | Set the `role` attribute |
|
||||
| title | <code>let</code> | No | <code>string</code> | <code>"Title"</code> | Specify the title text |
|
||||
| subtitle | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the subtitle text |
|
||||
| caption | <code>let</code> | No | <code>string</code> | <code>"Caption"</code> | Specify the caption text |
|
||||
| iconDescription | <code>let</code> | No | <code>string</code> | <code>"Closes notification"</code> | Specify the ARIA label for the icon |
|
||||
| hideCloseButton | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to hide the close button |
|
||||
|
||||
### Slots
|
||||
|
||||
|
|
|
@ -5679,16 +5679,6 @@
|
|||
"moduleName": "ToastNotification",
|
||||
"filePath": "/src/Notification/ToastNotification.svelte",
|
||||
"props": [
|
||||
{
|
||||
"name": "notificationType",
|
||||
"kind": "let",
|
||||
"description": "Set the type of notification",
|
||||
"type": "\"toast\" | \"inline\"",
|
||||
"value": "\"toast\"",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "kind",
|
||||
"kind": "let",
|
||||
|
@ -5795,16 +5785,6 @@
|
|||
"moduleName": "InlineNotification",
|
||||
"filePath": "/src/Notification/InlineNotification.svelte",
|
||||
"props": [
|
||||
{
|
||||
"name": "notificationType",
|
||||
"kind": "let",
|
||||
"description": "Set the type of notification",
|
||||
"type": "\"toast\" | \"inline\"",
|
||||
"value": "\"inline\"",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "kind",
|
||||
"kind": "let",
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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}
|
||||
|
|
6
types/Notification/InlineNotification.d.ts
vendored
6
types/Notification/InlineNotification.d.ts
vendored
|
@ -1,12 +1,6 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export interface InlineNotificationProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
/**
|
||||
* Set the type of notification
|
||||
* @default "inline"
|
||||
*/
|
||||
notificationType?: "toast" | "inline";
|
||||
|
||||
/**
|
||||
* Specify the kind of notification
|
||||
* @default "error"
|
||||
|
|
6
types/Notification/ToastNotification.d.ts
vendored
6
types/Notification/ToastNotification.d.ts
vendored
|
@ -1,12 +1,6 @@
|
|||
/// <reference types="svelte" />
|
||||
|
||||
export interface ToastNotificationProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
/**
|
||||
* Set the type of notification
|
||||
* @default "toast"
|
||||
*/
|
||||
notificationType?: "toast" | "inline";
|
||||
|
||||
/**
|
||||
* Specify the kind of notification
|
||||
* @default "error"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue