Feedback
EmptyState and Result
What to show when there is nothing yet, and the outcome of a flow or a page.
Ant Design: Empty, Result
import { EmptyState, Result } from '@alea/ui';
Examples
EmptyState
Nothing yet, and what to do about it.
No palettes yet
Make your first one from a brand color. It takes about a minute.
Result
Done, failed, not found, no access.
Payment received
Your license key is in your inbox.
Page not found
It moved, or it never existed.
Props
EmptyState props
What to show when there is nothing yet, and what to do about it (Ant's Empty).
| Prop | Type | Default | Description |
|---|---|---|---|
titlerequired | ReactNode | - | What is empty, in a few words. |
action | ReactNode | - | A button to fix it: "Create your first palette". |
description | ReactNode | - | What to do about it. |
headingAs | ElementType | 'h3' | The title's heading element. Default h3. |
icon | ReactNode | - | An icon or illustration. Default an inbox. |
Result props
The outcome of a flow or a whole page: done, failed, not found, no access (Ant's Result).
| Prop | Type | Default | Description |
|---|---|---|---|
statusrequired | "success" | "error" | "404" | "403" | "500" | "info" | - | success, error, 404, 403, 500 or info. |
titlerequired | ReactNode | - | What is empty, in a few words. |
action | ReactNode | - | A button to fix it: "Create your first palette". |
description | ReactNode | - | What to do about it. |
headingAs | ElementType | - | The title's heading element. Default h3. |
Do and don't
Do
- Say what to do next and offer the button for it.
Don't
- Don't blame the person.