@berlitz/alert

Alert component for the Max Design System

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@berlitz/alert
1.3.1720 days ago3 years agoMinified + gzip package size for @berlitz/alert in KB

Readme

Alert npm version
Display an alert banner in four different categories such as danger, warning, info and success .

Installation

yarn add @berlitz/alert

Props

| Argument | Type | Required | Default | Notes | | ----------- | ------ | -------- | ------- | -------------------------------------------------------- | | heading | string | ❌ | null | Take the heading text of the alert | | content | string | ❌ | null | This takes the main content of the component | | type | string | ❌ | "info" | This prop will accept danger, warning, info or success | | children | node | ❌ | null | useful for adding a addition element such as button | | disableIcon | bool | NA | false | removes icon from the component | | rounded | bool | NA | false | rounds the radius and adds 1px border to component |

Usage

import Alert from '@berlitz/alert'
const MyAlert () => <Alert type="success" heading="Success" content="I am a success alert!" />

  • Privacy policy banner
  • Confidentiality Agreement
  • Displaying a persistent, message to the user