InfoBanner
Informationsmeddelande
Komponent för att visa viktiga och aktuella meddelanden om händelser eller förändringar, som till exempel systemnotiser.
Sucess
Info
Important
Warning
Formuläret har skickats
Allt gick bra. Du kan nu stänga fönstret.
Installation
- npm
- Yarn
- pnpm
npm install @midas-ds/components
yarn add @midas-ds/components
pnpm add @midas-ds/components
import { InfoBanner } from '@midas-ds/components'
Varianter
Success
Info
Important
Warning
Dismissable
Det går att göra det möjligt för användaren att stänga informationsmeddelandet via dismissable
. Det bör inte användas för varningar.
API
Namn | Typ | Standard | Beskrivning |
---|---|---|---|
type * | "success" | "info" | "important" | "warning" | - | Specify what state the InfoBanner represents |
title | string | - | Specify the title |
message | ReactNode | - | Specify the message. Element or string |
children | ReactNode | - | Additional elements displayed inside the banner |
dismissable | boolean | false | Specify if the InfoBanner should have a dismiss button in the top right corner |