Skip to content

Commit

Permalink
feat(): Add pagination component and story.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanCQ committed Jan 2, 2024
1 parent 45a934d commit 3479e82
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export * from "./atoms/input";
export * from "./atoms/label";
export * from "./atoms/menubar";
export * from "./atoms/navigation-menu";
export * from "./atoms/pagination";
export * from "./atoms/popover";
export * from "./atoms/progress";
export * from "./atoms/radio-group";
Expand Down
54 changes: 54 additions & 0 deletions stories/atoms/pagination.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import {
Pagination,
PaginationContent,
PaginationEllipsis,
PaginationItem,
PaginationLink,
PaginationNext,
PaginationPrevious,
} from "src/atoms/pagination";

export function PaginationDemo() {
return (
<Pagination>
<PaginationContent>
<PaginationItem>
<PaginationPrevious href="#" />
</PaginationItem>
<PaginationItem>
<PaginationLink href="#">1</PaginationLink>
</PaginationItem>
<PaginationItem>
<PaginationLink href="#" isActive>
2
</PaginationLink>
</PaginationItem>
<PaginationItem>
<PaginationLink href="#">3</PaginationLink>
</PaginationItem>
<PaginationItem>
<PaginationEllipsis />
</PaginationItem>
<PaginationItem>
<PaginationNext href="#" />
</PaginationItem>
</PaginationContent>
</Pagination>
)
}


import type { Meta, StoryObj } from "@storybook/react";


const meta: Meta<typeof PaginationDemo> = {
component: PaginationDemo,
};

export default meta;

export const Default: StoryObj<typeof PaginationDemo> = {
args: {},
};


0 comments on commit 3479e82

Please sign in to comment.