feat: add amount of cards for add cards container

This commit is contained in:
RadoslavDimchev 2023-11-14 00:12:59 +02:00
parent a1210e2832
commit 69df48222e
3 changed files with 11 additions and 6 deletions

View File

@ -4,14 +4,19 @@ import AddCard from './AddCard'
import DashboardCardWrapper from '../../../pages/Dashboard/DashboardCardWrapper'
import { getHeightPercentages } from '../../../utilities'
const AddCardsContainer = () => {
const cards = 2
type AddCardsContainerProps = {
cardsAmount: number
}
const AddCardsContainer = ({ cardsAmount }: AddCardsContainerProps) => {
return (
<DashboardCardWrapper padding="0" minWidth="50px">
<YStack height={'100%'}>
{Array.from({ length: cards }).map((_, index) => (
<AddCard key={index} style={{ padding: '56px', height: getHeightPercentages(cards) }} />
{Array.from({ length: cardsAmount }).map((_, index) => (
<AddCard
key={index}
style={{ padding: '56px', height: getHeightPercentages(cardsAmount) }}
/>
))}
</YStack>
</DashboardCardWrapper>

View File

@ -42,7 +42,7 @@ const DashboardContent = ({ windowWidth }: DashboardContentProps) => {
}}
>
<SyncStatusCards />
<AddCardsContainer />
<AddCardsContainer cardsAmount={2} />
{windowWidth < 1375 ? (
<Stack style={{ gridColumn: '1 / span 2' }} width={'101%'}>
<BalanceChartCard />

View File

@ -24,7 +24,7 @@ const ValidatorManagementContent = () => {
<XStack justifyContent={'space-between'} width={'100%'}>
<ManagementCard />
<ManagementCard />
<AddCardsContainer />
<AddCardsContainer cardsAmount={2} />
</XStack>
<Text size={27} weight={'semibold'}>
Validators