fix: make icon work with status image

This commit is contained in:
RadoslavDimchev 2023-08-11 10:34:21 +03:00
parent e9b4946c73
commit e091c591f6
5 changed files with 9 additions and 8 deletions

View File

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

View File

@ -14,7 +14,7 @@ const IconText = ({ icon, children, ...props }: IconTextProps) => {
}}
space={'$2'}
>
<Icon source={icon} />
<Icon src={icon} />
<Paragraph {...props} color={'#000000'} fontWeight={'bold'}>
{children}
</Paragraph>

View File

@ -1,6 +1,7 @@
import LayoutComponent from './LayoutComponent'
import './LandingPage.css'
import QuickStartBar from './QuickStartBar'
import NodesLogo from './NodesLogo'
function LandingPage() {
return (
@ -23,6 +24,7 @@ function Content() {
nodes<span className="beta">BETA</span>
</p>
</div>
<NodesLogo />
</header>
<article className="content">
<div className="avatar">

View File

@ -11,7 +11,7 @@ const NimbusLogo = () => {
}}
space={'$2'}
>
<Icon source={'/icons/marks.png'} width={55} height={60} />
<Icon src={'/icons/marks.png'} width={55} height={60} />
<Text style={{ fontWeight: '650', fontSize: '24px' }}>Nimbus</Text>
<Tag text="BETA" />
</XStack>

View File

@ -11,7 +11,7 @@ const NodesLogo = () => {
}}
space={'$2'}
>
<Icon source={'src/assets/nodes-app-icon.png'} width={32} height={32} />
<Icon src={'src/assets/nodes-app-icon.png'} width={32} height={32} />
<Text style={{ fontWeight: '700', fontSize: '28px' }}>nodes</Text>
<Tag text="BETA" />
</XStack>