feat: add amount of cards for add cards container
This commit is contained in:
parent
a1210e2832
commit
69df48222e
|
@ -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>
|
||||
|
|
|
@ -42,7 +42,7 @@ const DashboardContent = ({ windowWidth }: DashboardContentProps) => {
|
|||
}}
|
||||
>
|
||||
<SyncStatusCards />
|
||||
<AddCardsContainer />
|
||||
<AddCardsContainer cardsAmount={2} />
|
||||
{windowWidth < 1375 ? (
|
||||
<Stack style={{ gridColumn: '1 / span 2' }} width={'101%'}>
|
||||
<BalanceChartCard />
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue