Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav authored and github-actions[bot] committed Mar 23, 2024
1 parent a832f60 commit e982f4e
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions packages/pagination/dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,21 @@ const PaginationDemo: Component = () => {
const [paginationProps, page, setPage] = createPagination({ pages: 100 });

return (
<div class="box-border flex w-1/2 flex-col items-center justify-center space-y-4 bg-gray-800 p-24 text-white">
<div class="wrapper-v">
<h4>Pagination component</h4>
<p>Current page: {page()} / 100</p>
<nav class="flex flex-row">
<For each={paginationProps()}>{props => <button {...props} />}</For>
</nav>
<button onClick={() => setPage(Math.round(Math.random() * 100 + 1))}>
jump to random page
</button>
</div>
<div class="box-border flex w-1/2 flex-col items-center justify-center space-y-4 bg-gray-800 p-24 text-white">
<div class="wrapper-v">
<h4>Pagination component</h4>
<p>Current page: {page()} / 100</p>
<nav class="flex flex-row">
<For each={paginationProps()}>{props => <button {...props} />}</For>
</nav>
<button onClick={() => setPage(Math.round(Math.random() * 100 + 1))}>
jump to random page
</button>
</div>
</div>
);
};


const InfiniteScrollDemo = () => {
const [pages, infiniteScrollLoader, { end }] = createInfiniteScroll(fetcher);
infiniteScrollLoader;
Expand All @@ -50,7 +49,7 @@ const InfiniteScrollDemo = () => {
</div>
</div>
);
}
};

const App: Component = () => {
return (
Expand Down

0 comments on commit e982f4e

Please sign in to comment.