From 5d832d0999f9fe4f512fabd0b7cde097331e9670 Mon Sep 17 00:00:00 2001 From: Marvin Petate <46154422+petatemarvin26@users.noreply.github.com> Date: Thu, 21 Nov 2024 22:05:06 +0800 Subject: [PATCH] release/2.1.0 (#65) --- package.json | 2 +- src/components/Button/types.ts | 2 +- src/components/Counter/types.ts | 3 ++- src/components/HeaderText/types.ts | 4 +++- src/components/Image/types.ts | 2 +- src/components/Indicator/Bar/types.ts | 3 ++- src/components/Indicator/CircleSnail/types.ts | 3 ++- src/components/Input/types.ts | 2 +- src/components/Pagination/types.ts | 13 ++++--------- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 33797e2..a5f4327 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vin-react", - "version": "2.0.5", + "version": "2.1.0", "description": "This library is exclusive for react that utilize the flexbox.", "main": "./lib/index.js", "types": "./lib/index.d.ts", diff --git a/src/components/Button/types.ts b/src/components/Button/types.ts index 1359082..785b1d1 100755 --- a/src/components/Button/types.ts +++ b/src/components/Button/types.ts @@ -7,7 +7,7 @@ type Props = { children?: any; title?: string; onClick?: MouseEventHandler; -} & React.HTMLAttributes & +} & React.ButtonHTMLAttributes & ConnectStyleProps; type States = {}; diff --git a/src/components/Counter/types.ts b/src/components/Counter/types.ts index aece1f1..c1b8823 100644 --- a/src/components/Counter/types.ts +++ b/src/components/Counter/types.ts @@ -9,6 +9,7 @@ type Props = { max?: number; value?: number; onChange?: (next: number) => void; -} & ConnectStyleProps; +} & ConnectStyleProps & + React.HTMLAttributes; export type {Props}; diff --git a/src/components/HeaderText/types.ts b/src/components/HeaderText/types.ts index 8fc734c..df63ecd 100755 --- a/src/components/HeaderText/types.ts +++ b/src/components/HeaderText/types.ts @@ -5,7 +5,9 @@ type Props = { className?: string; style?: CSSProperties; children?: any; -} & ConnectStyleProps; +} & ConnectStyleProps & + React.HTMLAttributes & + ConnectStyleProps; type States = {}; diff --git a/src/components/Image/types.ts b/src/components/Image/types.ts index f64b96e..542a162 100755 --- a/src/components/Image/types.ts +++ b/src/components/Image/types.ts @@ -8,7 +8,7 @@ type Props = { onLoadInit?: () => void; onLoadDone?: () => void; onLoading?: (percent: number) => void; -} & React.HTMLAttributes; +} & React.ImgHTMLAttributes; type States = { src: any; diff --git a/src/components/Indicator/Bar/types.ts b/src/components/Indicator/Bar/types.ts index a0f3af3..e5b35a2 100644 --- a/src/components/Indicator/Bar/types.ts +++ b/src/components/Indicator/Bar/types.ts @@ -22,6 +22,7 @@ type Props = { */ speed?: number; color?: string; -} & ConnectStyleProps; +} & ConnectStyleProps & + React.SVGAttributes; export type {Props}; diff --git a/src/components/Indicator/CircleSnail/types.ts b/src/components/Indicator/CircleSnail/types.ts index a3c03f8..b5eafad 100644 --- a/src/components/Indicator/CircleSnail/types.ts +++ b/src/components/Indicator/CircleSnail/types.ts @@ -22,7 +22,8 @@ type Props = { * @default `1s` */ speed?: number; -} & ConnectStyleProps; +} & ConnectStyleProps & + React.SVGAttributes; type State = {}; diff --git a/src/components/Input/types.ts b/src/components/Input/types.ts index 56963d6..4399cf3 100755 --- a/src/components/Input/types.ts +++ b/src/components/Input/types.ts @@ -9,7 +9,7 @@ type Props = { ref?: React.LegacyRef; inputRef?: (ref: HTMLInputElement | null) => any; onChangeText?: (value: string, event: ChangeEvent) => void; -} & React.HTMLAttributes; +} & React.InputHTMLAttributes; type States = {}; diff --git a/src/components/Pagination/types.ts b/src/components/Pagination/types.ts index dd85d35..e133978 100644 --- a/src/components/Pagination/types.ts +++ b/src/components/Pagination/types.ts @@ -2,10 +2,7 @@ import {MouseEvent} from 'react'; import {ConnectStyleProps} from '@/hoc/types'; type HandleClickPage = { - (key: number): ( - page: number, - e: MouseEvent - ) => void; + (key: number): (page: number, e: MouseEvent) => void; }; type State = { @@ -31,10 +28,8 @@ type Props = { * Current page selected */ currentPage?: number; - onPageChange?: ( - page: number, - event: MouseEvent - ) => void; -} & ConnectStyleProps; + onPageChange?: (page: number, event: MouseEvent) => void; +} & ConnectStyleProps & + React.HTMLAttributes; export type {Props, State, HandleClickPage};