Skip to content

Commit

Permalink
fix: updated captiontext for numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
meenakshi-deriv committed Apr 15, 2024
1 parent f3c2b93 commit 6b8b3f8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
8 changes: 7 additions & 1 deletion lib/components/Pagination/base/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
import { DOTS } from "../../../hooks/usePaginationRange.tsx";
import { PaginationProps } from "../types";
import "./pagination-base.scss";
import { CaptionText } from "../../Typography/caption";

interface PaginationButtonProps extends Pick<PaginationProps, "variant"> {
pageNumber: number | string;
Expand Down Expand Up @@ -58,7 +59,12 @@ const PaginationButton = ({
onClick={(e) => handleOnClick(e.currentTarget.textContent)}
className="variant__number"
>
{pageNumber}
<CaptionText
className="number-text"
aria-current={currentPage === pageNumber}
>
{pageNumber}
</CaptionText>
</button>
);
};
Expand Down
12 changes: 8 additions & 4 deletions lib/components/Pagination/base/pagination-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
background-color: var(--core-color-solid-slate-1400);
}
}
color: var(--semantic-color-typography-default);
&[aria-current=true] {
color: var(--core-color-solid-slate-50);
}

}
&__bullet {

Expand All @@ -45,4 +42,11 @@
}
.hidden_pages {
display: flex;
}
.number-text{
&[aria-current=true]{
font-weight: bold;
color: var(--core-color-solid-slate-50);
}
color: var(--semantic-color-typography-default);
}
2 changes: 1 addition & 1 deletion lib/components/Typography/caption/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const CaptionText = ({
as = "p",
italic = false,
underlined = false,
bold = true,
bold = false,
...rest
}: TypographyProps) => {
const decoration = getTextDecoration(italic, underlined);
Expand Down

0 comments on commit 6b8b3f8

Please sign in to comment.