fix(add-cards): remove container and move add card

This commit is contained in:
RadoslavDimchev 2024-04-22 21:21:36 +03:00 committed by Emil Ivanichkov
parent 8224b5f24e
commit 155627250c
4 changed files with 0 additions and 56 deletions

View File

@ -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,
},
}

View File

@ -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