Empty state
What a list shows with nothing in it, and what to do about it.
import { EmptyState } from "@forgeron/ui";No form here yet.
import { NoteAddIcon } from "@forgeron/icons";
import { EmptyState } from "@forgeron/ui";
export default function Hatch() {
return (
<div style={{ width: "100%", maxWidth: 560 }}>
<EmptyState
variant="hatch"
icon={NoteAddIcon}
title="No form here yet."
description={
<>
<a href="#new">Create one</a> or <a href="#templates">start from a template</a>.
</>
}
/>
</div>
);
}No project views yet.
Filter the projects list, then save it.
import { Button, EmptyState } from "@forgeron/ui";
export default function WithAction() {
return (
<div style={{ width: "100%", maxWidth: 560 }}>
<EmptyState
title="No project views yet."
description="Filter the projects list, then save it."
action={<Button variant="primary">New view</Button>}
/>
</div>
);
}API → Props
| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | — | One line. |
description | ReactNode | — | The way out, links allowed. |
icon | IconDefinition | — | Above the title. |
variant | "plain" | "hatch" | "plain" | A dashed frame, or the hatched field. |
action | ReactNode | — | The one thing to do. |
className | string | — | Extra classes. |