Installation
Section titled “Installation”- Package
@bigbang/ui- Import
import { InlineAlert } from '@bigbang/ui';- Source
- InlineAlert.tsx
- Storybook
- InlineAlert · Playground
InlineAlert is in the @bigbang/ui package.
import { InlineAlert } from '@bigbang/ui';
<InlineAlert tone="danger" title="The form could not be sent" announce> Fix the marked fields and send it again.</InlineAlert>;childrenRequired- Description
- The message: one or two sentences that say what happened and what to do.
- Type
ReactNode
tone- Description
- Meaning, colour and icon:
infofor neutral information,success,warningfor something that needs attention,dangerfor an error that blocks the task. - Type
AlertTone- Default
'info'
title- Description
- Short heading above the message.
- Type
ReactNode
actions- Description
- Buttons or links under the message, at most two, such as a secondary Button and a Link.
- Type
ReactNode
dismissible- Description
- Shows a close button. The alert fades out and
onDismissruns. - Type
boolean- Default
false
onDismiss- Description
- Runs after the alert has been dismissed and has faded out.
- Type
() => void
dismissLabel- Description
- Accessible name of the close button. Defaults to the
ui.alert.dismisslibrary string ("Uyarıyı kapat" or "Dismiss"). - Type
string
announce- Description
- Announces the alert when it appears after the page has loaded, such as after a form is submitted:
dangerasrole="alert", other tones asrole="status". Leave it off for an alert that is part of the page. - Type
boolean- Default
false
className- Description
- For layout only: margins and placement.
- Type
string
Data attributes
Section titled “Data attributes”data-component="inline-alert"anddata-tone: on the root.data-ending-style: while it is closing.