インポート
コードをコピー
import { Pagination } from '@k8ordo/ui';使い方
縦書きプレビューに切り替え
コードをコピー
const [page, setPage] = useState(1);
<Pagination
currentPage={page}
onChange={setPage}
totalPages={10}
/>無効
縦書きプレビューに切り替え
コードをコピー
<Pagination
currentPage={3}
disabled
onChange={() => {}}
totalPages={10}
/>Props
currentPage- Type:
number - Default: -
onChange- Type:
(page: number) => void - Default: -
totalPages- Type:
number - Default: -
aria-label?- Type:
string - Default: -
disabled?- Type:
boolean - Default:
false nextLabel?- Type:
string - Default: -
prevLabel?- Type:
string - Default: -
ref?- Type:
Ref<HTMLElement> - Default: -
| Prop | Type | Default |
|---|---|---|
currentPage | number | - |
onChange | (page: number) => void | - |
totalPages | number | - |
aria-label? | string | - |
disabled? | boolean | false |
nextLabel? | string | - |
prevLabel? | string | - |
ref? | Ref<HTMLElement> | - |
継承する属性(内部で固定するものを除く): HTMLAttributes<HTMLElement>
ラベルやプレースホルダーなど、このコンポーネントが描く文言は、propsで指定しないと文言辞書から読まれます。差し替え方は次を見てください: コンポーネントの文言