Merge branch 'Create-Dashboard' of https://github.com/nimbus-gui/nimbus-gui into Create-Dashboard

This commit is contained in:
Hristo Nedelkov 2023-09-14 12:18:05 +03:00
commit dd83e30718
4 changed files with 20 additions and 21 deletions

View File

@ -1,19 +1,16 @@
import { YStack } from 'tamagui' import { YStack } from 'tamagui'
import AddCard from './AddCard' import AddCard from './AddCard'
import DashboardCardWrapper from '../../../pages/Dashboard/DashboardCardWrapper'
const AddCardsContainer = () => { const AddCardsContainer = () => {
return ( return (
<YStack <DashboardCardWrapper padding="0">
style={{ <YStack>
borderRadius: '16px', <AddCard />
boxShadow: '0 0 8px rgba(0, 0, 0, 0.1)', <AddCard />
backgroundColor: '$background', </YStack>
}} </DashboardCardWrapper>
>
<AddCard />
<AddCard />
</YStack>
) )
} }

View File

@ -19,3 +19,10 @@ export const Default: Story = {
children: 'Default', children: 'Default',
}, },
} }
export const WithoutPadding: Story = {
args: {
children: 'Default',
padding: '0',
},
}

View File

@ -1,21 +1,15 @@
import { Stack } from 'tamagui' import { Shadow } from '@status-im/components'
type DashboardCardWrapperProps = { type DashboardCardWrapperProps = {
children: React.ReactNode children: React.ReactNode
padding?: string
} }
const DashboardCardWrapper = ({ children }: DashboardCardWrapperProps) => { const DashboardCardWrapper = ({ children, padding = '12px 16px' }: DashboardCardWrapperProps) => {
return ( return (
<Stack <Shadow variant="$1" style={{ borderRadius: '16px', padding, backgroundColor: '$background' }}>
style={{
borderRadius: '16px',
boxShadow: '0 0 8px rgba(0, 0, 0, 0.1)',
padding: '12px 16px',
backgroundColor: '$background',
}}
>
{children} {children}
</Stack> </Shadow>
) )
} }

View File

@ -1,4 +1,5 @@
import { YStack } from 'tamagui' import { YStack } from 'tamagui'
import SyncCardContent from './SyncCardContent' import SyncCardContent from './SyncCardContent'
const SyncStatusCard = () => { const SyncStatusCard = () => {