Skip to content

Commit 9be842f

Browse files
fix(Pagination): add JSDoc to main export for docstring coverage
1 parent f16b1dd commit 9be842f

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

packages/ui/src/components/Pagination/Pagination.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ describe("Pagination", () => {
182182
expect(pages()[0]).toBe(1);
183183
});
184184

185-
186185
it("should change previous and next text when provided", () => {
187186
render(
188187
<Pagination

packages/ui/src/components/Pagination/Pagination.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ export interface TablePaginationProps extends BasePaginationProps {
6666

6767
export type PaginationProps = DefaultPaginationProps | TablePaginationProps;
6868

69+
/**
70+
* Top-level Pagination component. Switches between Default and Table variants
71+
* based on the `layout` prop.
72+
* @param props - Discriminated union of DefaultPaginationProps and TablePaginationProps.
73+
* @param ref - Ref forwarded to the underlying nav element.
74+
* @returns The rendered pagination navigation.
75+
*/
6976
export const Pagination = forwardRef<HTMLElement, PaginationProps>((props, ref) => {
7077
if (props.layout === "table") return <TablePagination {...props} ref={ref} />;
7178
return <DefaultPagination {...props} ref={ref} />;

0 commit comments

Comments
 (0)