Components

MessageBox

<MessageBox />

Component responsible for rendering standard danger/info/success messages.

It has 2 size versions: default and small. Also it can either contain or don't contain children, which causes different look.

Usage

import { MessageBox, MessageBoxProps } from '@admin-bro/design-system'
See:

View Source admin-bro-design-system/src/molecules/message-box.tsx, line 132

Examples

Different variants

Different variants with children

Small with an icon and inside text

Type Definitions

object

# MessageBoxProps

Prop Types of a MessageBox component. Apart from those defined below it extends all SpaceProps

Properties:
Name Type Attributes Description
onCloseClick function <optional>

Triggered when user clicks close button. If not given close button won't be seen

message string <optional>

Title content of a message

variant 'danger' | 'info' | 'success' <optional>

Variant

icon string <optional>

Icon which will be seen in the title

size 'sm' <optional>

Size variant

style Record.<string, string> <optional>

Optional html style property

children React.ReactNode <optional>

Optional children, when given component will be expanded

View Source admin-bro-design-system/src/molecules/message-box.tsx, line 159

SoftwareBrothers

Proudly built and maintained by SoftwareBrothers

Software House with a passion for both JavaScript and TypeScript.

See what we do See what we believe in

Proudly built and maintained by

SoftwareBrothers