インポート
import { EmptyState } from '@k8ordo/ui';使い方
No posts yet
<EmptyState title="No posts yet" />アイコンと操作
No matching posts
Removing a filter may bring some back.
<EmptyState
action={
<Button color="base" size="sm" variant="outline">
Clear filters
</Button>
}
description="Removing a filter may bring some back."
icon={<TableIcon size="lg" />}
title="No matching posts"
/>Table.EmptyState
表の中では Table.EmptyState を使う。列をまたぐ行の中に、同じ内容を描く。
| Name | Role |
|---|---|
No members yet | |
<Table.Root>
<Table.Head>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Role</Table.HeaderCell>
</Table.Row>
</Table.Head>
<Table.Body>
<Table.EmptyState colSpan={2} title="No members yet" />
</Table.Body>
</Table.Root>Props
title- Type:
string - Default: -
action?- Type:
ReactNode - Default: -
description?- Type:
ReactNode - Default: -
icon?- Type:
ReactNode - Default: -
| Prop | Type | Default |
|---|---|---|
title | string | - |
action? | ReactNode | - |
description? | ReactNode | - |
icon? | ReactNode | - |
型ベース(内部で固定する一部attrsは除外): HTMLAttributes<HTMLDivElement>