Wrapper

This component extends the native <div> API, for example, the title attribute.

API

This component extends the native <div> API. That's why the className prop is not included in the table.

Props
Data Type
Required

children

ReactNode

isOpen

boolean

heading

string

display

'block' | 'overlay'

zIndex

number

variant

'default' | 'success' | 'danger' | 'warning';

onClose

() => void

children

The subcomponents provided.

isOpen

To control the state of the Banner.

heading

The title rendered.

display

The behavior of the Banner,if 'overlay' is used, the component will overlay everything, depending on the zIndex passed, taking an absolute position. If not, a normal block is rendered.

zIndex

A number used to control the zIndex directly at the component level.

variant

To change the presentation of the Banner.

icon

A custom icon that overrides the default ones.

onClose

A function executed when the 'x' button is clicked. Tipically triggering a state change to isOpen.

Last updated