Skip to content

components/Notice

import { … } from 'zidane-ui'ui/src/components/Notice.tsx

Components#

NoticeComponent#

Renders a toned message: glyph, the words, an optional action, and the raw detail folded away.

TypeScript
function Notice(props: NoticeProps): Element
Parameters
NameTypeDescription
propsNoticeProps

NoticeProps.

Element
Notice props
NameTypeDescription
action?ReactNode

A control after the message (Retry, Open settings).

childrenReactNode

The message, worded for people.

className?string

Extra classes on the root element.

compact?boolean

One tight line, for a row or a form field. Default: a block with room around it.

detail?string

The raw words behind it (an exception's message, a server's answer): folded under Details.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

toneNoticeTone

How serious it is: the glyph, the colour, and alert (error) or status.

ui/src/components/Notice.tsx:45

Interfaces#

NoticePropsInterface#

Props for Notice.

TypeScript
interface NoticeProps
NoticeProps properties
NameTypeDescription
action?ReactNode

A control after the message (Retry, Open settings).

childrenReactNode

The message, worded for people.

className?string

Extra classes on the root element.

compact?boolean

One tight line, for a row or a form field. Default: a block with room around it.

detail?string

The raw words behind it (an exception's message, a server's answer): folded under Details.

style?CSSProperties

Inline styles on the root element, merged after the component's own.

toneNoticeTone

How serious it is: the glyph, the colour, and alert (error) or status.

ui/src/components/Notice.tsx:17

Types#

NoticeToneType#

How serious a Notice is.

TypeScript
type NoticeTone = 'error' | 'warning' | 'info'

ui/src/components/Notice.tsx:14