Add fixed size to the static box

This commit is contained in:
Hristo Nedelkov 2023-08-09 11:18:02 +03:00
parent ae8fcca173
commit 4ee27c6cd8
3 changed files with 10 additions and 9 deletions

View File

@ -6,19 +6,13 @@ import { Provider as StatusProvider } from '@status-im/components'
import LandingPage from './components/LayoutComponent/LandingPage'
import config from '../tamagui.config'
import StatisticBox from './components/StaticBox'
function App() {
return (
<TamaguiProvider config={config}>
<StatisticBox
memory="45"
stateIcon="https://placehold.co/16x16"
stateText="Improving performance"
title="Title of the box"
/>
<StatusProvider>
<LandingPage />
</StatusProvider>
</TamaguiProvider>
)

View File

@ -1,6 +1,7 @@
import LayoutComponent from './LayoutComponent'
import './LandingPage.css'
import QuickStartBar from '../QuickStartBar/QuickStartBar'
import StatisticBox from '../StaticBox'
function LandingPage() {
return (
@ -95,6 +96,12 @@ function Content() {
Discover Nodes
</button>
</article>
<StatisticBox
memory="45"
stateIcon="https://placehold.co/16x16"
stateText="Improving performance"
title="Title of the box"
/>
</div>
)
}

View File

@ -66,7 +66,7 @@ const StatisticBox: React.FC<StatisticBoxProps> = ({
...props
}) => {
return (
<ShadowBox {...props}>
<ShadowBox {...props} style={{ maxWidth: '284px', maxHeight: '136px' }}>
<YStack>
<XStack
justifyContent="space-between"