From f08676e73da4aade3bbb4bc8bf4654e338ff6119 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Sat, 3 May 2025 09:20:18 -0700 Subject: [PATCH] docs(inline-notification): improve docs --- .../pages/components/InlineNotification.svx | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/docs/src/pages/components/InlineNotification.svx b/docs/src/pages/components/InlineNotification.svx index 33482ced..f17548de 100644 --- a/docs/src/pages/components/InlineNotification.svx +++ b/docs/src/pages/components/InlineNotification.svx @@ -7,26 +7,29 @@ components: ["InlineNotification", "NotificationActionButton"] import Preview from "../../components/Preview.svelte"; -Notification that appears inline. +The `InlineNotification` component displays contextual messages inline with content. It supports various types of notifications (error, warning, success, info) and can include actions. Use it to provide feedback or important information to users. -See [detailed -usage](https://carbondesignsystem.com/components/notification/usage). +See [detailed usage](https://carbondesignsystem.com/components/notification/usage). See also: [ToastNotification](ToastNotification) ## Default (error) +Display a basic error notification with title and subtitle. + ## Prevent default close behavior -`InlineNotification` is a controlled component. Prevent the default close behavior using the `e.preventDefault()` method in the dispatched `on:close` event. +The component is controlled, allowing you to prevent the default close behavior using `e.preventDefault()`. { e.preventDefault(); // custom close logic (e.g., transitions) }} /> -## Slottable title, subtitle +## Slottable title and subtitle + +Customize the notification content using slots for more flexibility. Error: @@ -35,9 +38,7 @@ See also: [ToastNotification](ToastNotification) ## Accessible icon descriptions -The status icon and close button icon descriptions appear on cursor hover and are read -by assistive technology. Default descriptions are provided in English and can be -overridden via `statusIconDescription` and `closeButtonDescription`. +Make notifications more accessible by providing custom descriptions for icons.