refactor: convert Icon jsx component to tsx

This commit is contained in:
RadoslavDimchev 2023-08-08 09:06:24 +03:00
parent 2c632552b3
commit ce712c621b
2 changed files with 13 additions and 7 deletions

View File

@ -1,7 +0,0 @@
import { Image } from 'tamagui'
const Icon = ({ source, width = 16, height = 16, ...props }) => {
return <Image {...props} source={{ uri: source }} width={width} height={height} />
}
export default Icon

13
src/components/Icon.tsx Normal file
View File

@ -0,0 +1,13 @@
import { Image } from 'tamagui'
type IconProps = {
source: string
width?: number
height?: number
}
const Icon = ({ source, width = 16, height = 16, ...props }: IconProps) => {
return <Image {...props} source={{ uri: source }} width={width} height={height} />
}
export default Icon