Skip to content

Commit

Permalink
feat: pagination will use className if provided
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarni committed Feb 26, 2025
1 parent cebeef9 commit d29b73f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/jokul/src/components/pagination/Pagination.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import clsx from "clsx";
import React, { useEffect } from "react";
import { PolymorphicRef } from "../../utilities/polymorphism/polymorphism.js";
import { ChevronLeftIcon } from "../icon/icons/ChevronLeftIcon.js";
Expand All @@ -22,6 +23,7 @@ export const Pagination = React.forwardRef(function Pagination<
next: "Neste side",
},
as,
className,
...rest
}: PaginationProps<ElementType>,
ref?: PolymorphicRef<ElementType>,
Expand All @@ -43,7 +45,11 @@ export const Pagination = React.forwardRef(function Pagination<

if (numberOfPages <= 7) {
return (
<Component ref={ref} {...rest} className="jkl-pagination">
<Component
ref={ref}
{...rest}
className={clsx("jkl-pagination", className)}
>
<IconButton
className="jkl-pagination-button"
title={labels.previous}
Expand Down

0 comments on commit d29b73f

Please sign in to comment.