From 0bb728eacfa204ed4bca96263966ce7197aa467c Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Tue, 8 Aug 2023 09:28:35 +0300 Subject: [PATCH] refactor: buttons convert to ts --- src/components/IconButton.jsx | 12 ------------ src/components/IconButton.tsx | 18 ++++++++++++++++++ src/components/ReactButton.jsx | 7 ------- src/components/ReactButton.tsx | 16 ++++++++++++++++ 4 files changed, 34 insertions(+), 19 deletions(-) delete mode 100644 src/components/IconButton.jsx create mode 100644 src/components/IconButton.tsx delete mode 100644 src/components/ReactButton.jsx create mode 100644 src/components/ReactButton.tsx diff --git a/src/components/IconButton.jsx b/src/components/IconButton.jsx deleted file mode 100644 index 08ef9163..00000000 --- a/src/components/IconButton.jsx +++ /dev/null @@ -1,12 +0,0 @@ -import { Icon } from '../Icon/Icon' -import { ReactButton } from './ReactButton' - -const IconButton = ({ icon, text, ...props }) => { - return ( - }> - {text} - - ) -} - -export default IconButton diff --git a/src/components/IconButton.tsx b/src/components/IconButton.tsx new file mode 100644 index 00000000..0b4eddad --- /dev/null +++ b/src/components/IconButton.tsx @@ -0,0 +1,18 @@ +import Icon from './Icon' +import ReactButton from './ReactButton' + +type IconButtonProps = { + icon: string + children: string + onClick: () => void +} + +const IconButton = ({ icon, children, ...props }: IconButtonProps) => { + return ( + }> + {children} + + ) +} + +export default IconButton diff --git a/src/components/ReactButton.jsx b/src/components/ReactButton.jsx deleted file mode 100644 index 3e566bb4..00000000 --- a/src/components/ReactButton.jsx +++ /dev/null @@ -1,7 +0,0 @@ -import { Button } from 'tamagui' - -const ReactButton = ({ children, ...props }) => { - return -} - -export default ReactButton diff --git a/src/components/ReactButton.tsx b/src/components/ReactButton.tsx new file mode 100644 index 00000000..2f5e6c18 --- /dev/null +++ b/src/components/ReactButton.tsx @@ -0,0 +1,16 @@ +import { Button } from 'tamagui' +import { ReactNode } from 'react' + +type ReactButtonProps = { + children: string + style?: unknown + icon?: ReactNode + size?: string + onClick: () => void +} + +const ReactButton = ({ children, ...props }: ReactButtonProps) => { + return +} + +export default ReactButton