Files
cunningham/apps/demo/src/App.tsx
Nathan Vasse 88e478d9f6 (react) add Pagination component
In order to create a DataGrid we first need a fully working pagination
component. It comes with multiples working examples in the documentation.
2023-03-28 12:00:27 +02:00

16 lines
521 B
TypeScript

import { Button, usePagination, Pagination } from "@openfun/cunningham-react";
import React from "react";
import { tokens } from "./cunningham-tokens";
export const App = () => {
const pagination = usePagination({ defaultPage: 50, defaultPagesCount: 100 });
return (
<div className="center">
<h1 className="test">Cunningham Demo.</h1>
<Button>World best button.</Button>
<h3>Primary-500 color is {tokens.theme.colors["primary-500"]}</h3>
<Pagination {...pagination} />
</div>
);
};