Notice
A message in the flow of the page; the state always comes with a word.
import { Notice } from "@forgeron/ui";Warning
The Odoo token expires in 3 days.
import { Button, Notice } from "@forgeron/ui";
export default function Default() {
return (
<div style={{ width: "100%", maxWidth: 520 }}>
<Notice
tone="warning"
title="The Odoo token expires in 3 days."
action={<Button size="sm">Renew</Button>}
/>
</div>
);
}Note
Previews close after 7 days.
Done
crm 1.4.0 is live.
Warning
The Odoo token expires in 3 days.
Error
The deploy failed.
The build stopped on a type error in src/actions.ts.
import { Button, Notice } from "@forgeron/ui";
export default function Tones() {
return (
<div style={{ display: "grid", gap: 12, width: "100%", maxWidth: 520 }}>
<Notice title="Previews close after 7 days." />
<Notice tone="success" title="crm 1.4.0 is live." />
<Notice
tone="warning"
title="The Odoo token expires in 3 days."
action={<Button size="sm">Renew</Button>}
/>
<Notice tone="danger" title="The deploy failed.">
The build stopped on a type error in src/actions.ts.
</Notice>
</div>
);
}API → Props
| Prop | Type | Default | Description |
|---|---|---|---|
tone | "info" | "success" | "warning" | "danger" | "info" | Note, Done, Warning, Error. |
title | ReactNode | — | One line. |
action | ReactNode | — | The thing to do next. |
children | ReactNode | — | The detail. |
className | string | — | Extra classes. |