diff --git a/CHANGELOG.md b/CHANGELOG.md index a803126..ad4467e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.0.273](https://github.com/getpingback/ui/compare/v0.0.272...v0.0.273) (2024-12-02) + + +### Bug Fixes + +* current page change ([940b482](https://github.com/getpingback/ui/commits/940b482b0974fb48e0600d7db71d8f07defe25ea)) + ### [0.0.271](https://github.com/getpingback/ui/compare/v0.0.269...v0.0.271) (2024-12-02) diff --git a/package.json b/package.json index 864d000..1843ae2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@getpingback/ui", "author": "Pingback Team", - "version": "0.0.272", + "version": "0.0.274", "license": "MIT", "main": "dist/cjs/index.js", "module": "dist/esm/index.js", diff --git a/src/components/pagination/pagination.tsx b/src/components/pagination/pagination.tsx index c902c54..11136b6 100644 --- a/src/components/pagination/pagination.tsx +++ b/src/components/pagination/pagination.tsx @@ -1,12 +1,7 @@ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import { cn } from '@/lib/utils'; import { cva } from 'class-variance-authority'; -import { - ChevronLeftIcon, - ChevronRightIcon, - ChevronDoubleLeftIcon, - ChevronDoubleRightIcon, -} from '@stash-ui/regular-icons'; +import { ChevronLeftIcon, ChevronRightIcon, ChevronDoubleLeftIcon, ChevronDoubleRightIcon } from '@stash-ui/regular-icons'; import { getPaginationRange, DOTS } from '@/lib/utils'; const buttonVariants = cva( @@ -14,19 +9,18 @@ const buttonVariants = cva( { variants: { variant: { - default: - 'bg-transparent px-0 opacity-85 text-button-page-color-clear hover:bg-button-page-ghost hover:opacity-1', - solid: 'bg-button-page-solid text-button-page-color-solid px-3 ', + default: 'bg-transparent px-0 opacity-85 text-button-page-color-clear hover:bg-button-page-ghost hover:opacity-1', + solid: 'bg-button-page-solid text-button-page-color-solid px-3 ' }, rounded: { default: 'rounded-lg', - full: 'rounded-full', - }, + full: 'rounded-full' + } }, defaultVariants: { variant: 'default', - rounded: 'default', - }, + rounded: 'default' + } } ); @@ -36,20 +30,13 @@ export interface PaginationItemProps extends React.ComponentProps<'button'> { disabled?: boolean; } -function PaginationItem({ - children, - isActive, - isRounded, - className, - disabled, - ...props -}: PaginationItemProps) { +function PaginationItem({ children, isActive, isRounded, className, disabled, ...props }: PaginationItemProps) { return (