@ambuj.bhaskar/react-component-library 0.14.0-alpha → 0.15.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { default as default_2 } from 'react';
3
+ import { Dispatch } from 'react';
3
4
  import { JSX as JSX_2 } from 'react/jsx-runtime';
4
5
  import * as React_2 from 'react';
5
6
  import { ReactNode } from 'react';
7
+ import { SetStateAction } from 'react';
6
8
  import { TimeRangePickerProps } from 'antd';
7
9
 
8
10
  export declare const Badge: React.FC<BadgeProps>;
@@ -253,6 +255,18 @@ declare type Option_2 = {
253
255
  value: string | number;
254
256
  };
255
257
 
258
+ export declare const Pagination: ({ totalPages, currentPage, onPageChange, onNext, onPrev, color, size, }: PaginationProps) => JSX_2.Element;
259
+
260
+ export declare type PaginationProps = {
261
+ totalPages: number;
262
+ currentPage: number;
263
+ onPageChange: (page: number) => void;
264
+ onNext: () => void;
265
+ onPrev: () => void;
266
+ color?: Color;
267
+ size?: "s" | "m" | "l";
268
+ };
269
+
256
270
  export declare const Select: React.FC<SelectProps>;
257
271
 
258
272
  export declare type SelectProps = {
@@ -413,6 +427,15 @@ declare type ToastProps = {
413
427
 
414
428
  declare type ToastType = "success" | "error" | "info" | "warning";
415
429
 
430
+ export declare function usePagination(initialPage?: number): {
431
+ currentPage: number;
432
+ setPage: (newPage: number) => void;
433
+ nextPage: () => void;
434
+ prevPage: () => void;
435
+ totalPages: number;
436
+ setTotalPages: Dispatch<SetStateAction<number>>;
437
+ };
438
+
416
439
  export declare const useTheme: () => Record<string, string>;
417
440
 
418
441
  export declare const useToast: () => {