mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-27 10:30:31 +00:00
fix(add-cards): remove container and move add card
This commit is contained in:
parent
8224b5f24e
commit
155627250c
@ -1,27 +0,0 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react'
|
||||
|
||||
import AddCardsContainer from './AddCardsContainer'
|
||||
|
||||
const meta = {
|
||||
title: 'General/AddCardsContainer',
|
||||
component: AddCardsContainer,
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
},
|
||||
tags: ['autodocs'],
|
||||
} satisfies Meta<typeof AddCardsContainer>
|
||||
|
||||
export default meta
|
||||
type Story = StoryObj<typeof meta>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
cardsAmount: 2,
|
||||
},
|
||||
}
|
||||
|
||||
export const WithoutCards: Story = {
|
||||
args: {
|
||||
cardsAmount: 0,
|
||||
},
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
import { YStack } from 'tamagui'
|
||||
|
||||
import AddCard from './AddCard'
|
||||
import DashboardCardWrapper from '../../../pages/Dashboard/DashboardCardWrapper'
|
||||
import { getHeightPercentages } from '../../../utilities'
|
||||
|
||||
type AddCardsContainerProps = {
|
||||
cardsAmount: number
|
||||
}
|
||||
|
||||
const AddCardsContainer = ({ cardsAmount }: AddCardsContainerProps) => {
|
||||
return (
|
||||
<DashboardCardWrapper style={{ padding: 0, minWidth: '50px' }}>
|
||||
<YStack height={'100%'}>
|
||||
{Array.from({ length: cardsAmount }).map((_, index) => (
|
||||
<AddCard
|
||||
key={index}
|
||||
style={{
|
||||
padding: '40px',
|
||||
height: getHeightPercentages(cardsAmount),
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</YStack>
|
||||
</DashboardCardWrapper>
|
||||
)
|
||||
}
|
||||
|
||||
export default AddCardsContainer
|
Loading…
x
Reference in New Issue
Block a user