mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-01-20 16:30:34 +00:00
refactor: convert Icon jsx component to tsx
This commit is contained in:
parent
2c632552b3
commit
ce712c621b
@ -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
13
src/components/Icon.tsx
Normal 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
|
Loading…
x
Reference in New Issue
Block a user