mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-18 06:16:38 +00:00
refactor: rest icon components to tsx
This commit is contained in:
parent
0bb728eacf
commit
67898225d1
@ -1,9 +1,10 @@
|
||||
import { Image } from 'tamagui'
|
||||
|
||||
type IconProps = {
|
||||
export type IconProps = {
|
||||
source: string
|
||||
width?: number
|
||||
height?: number
|
||||
style?: unknown
|
||||
}
|
||||
|
||||
const Icon = ({ source, width = 16, height = 16, ...props }: IconProps) => {
|
||||
|
@ -1,7 +1,12 @@
|
||||
import { Paragraph, XStack } from 'tamagui'
|
||||
import { Icon } from '../Icon/Icon'
|
||||
import Icon from './Icon'
|
||||
|
||||
const IconText = ({ icon, text, ...props }) => {
|
||||
type IconTextProps = {
|
||||
icon: string
|
||||
children: string
|
||||
}
|
||||
|
||||
const IconText = ({ icon, children, ...props }: IconTextProps) => {
|
||||
return (
|
||||
<XStack
|
||||
style={{
|
||||
@ -11,7 +16,7 @@ const IconText = ({ icon, text, ...props }) => {
|
||||
>
|
||||
<Icon source={icon} width={16} height={16} />
|
||||
<Paragraph {...props} color={'#000000'}>
|
||||
{text}
|
||||
{children}
|
||||
</Paragraph>
|
||||
</XStack>
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user