feat: add padding prop to AddCard component

This commit is contained in:
Ivana Andersson 2023-09-27 11:58:34 +03:00
parent f6855910cc
commit 0f7d3ba897
3 changed files with 17 additions and 5 deletions

View File

@ -1,7 +1,11 @@
import { Stack } from 'tamagui' import { Stack } from 'tamagui'
import { AddIcon } from '@status-im/icons' import { AddIcon } from '@status-im/icons'
const AddCard = () => { type AddCardProps = {
padding: string
}
const AddCard = ({ padding }: AddCardProps) => {
return ( return (
<Stack <Stack
style={{ style={{
@ -9,7 +13,7 @@ const AddCard = () => {
borderRadius: '16px', borderRadius: '16px',
cursor: 'pointer', cursor: 'pointer',
minHeight: '150px', minHeight: '150px',
padding: '0 7vw', padding: padding,
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
backgroundColor: 'white', backgroundColor: 'white',

View File

@ -7,8 +7,8 @@ const AddCardsContainer = () => {
return ( return (
<DashboardCardWrapper padding="0"> <DashboardCardWrapper padding="0">
<YStack> <YStack>
<AddCard /> <AddCard padding={'0 7vw'} />
<AddCard /> <AddCard padding={'0 7vw'} />
</YStack> </YStack>
</DashboardCardWrapper> </DashboardCardWrapper>
) )

View File

@ -3,6 +3,7 @@ import { XStack, YStack } from 'tamagui'
import ValidatorListItem from './ValidatorListItem' import ValidatorListItem from './ValidatorListItem'
import InputSearch from './SearchInput' import InputSearch from './SearchInput'
import { CloseCircleIcon, ChevronRightIcon } from '@status-im/icons' import { CloseCircleIcon, ChevronRightIcon } from '@status-im/icons'
import AddCard from '../../../components/General/AddCards/AddCard'
const RightSidebar = () => { const RightSidebar = () => {
return ( return (
@ -21,7 +22,14 @@ const RightSidebar = () => {
<Text size={13}>0xb9d...c35</Text> <Text size={13}>0xb9d...c35</Text>
</YStack> </YStack>
</XStack> </XStack>
<XStack alignItems="center" justifyContent="space-between">
<YStack backgroundColor={'#2A4AF5'} style={{ padding: '8px 12px', borderRadius: '16px' }}>
<Text size={15} weight={'semibold'} color={'#FFF'}>
Diamond Hands
</Text>
</YStack>
<AddCard padding={'0 2vw'} />
</XStack>
<Tabs defaultValue="active"> <Tabs defaultValue="active">
<Tabs.List size={32}> <Tabs.List size={32}>
<Tabs.Trigger type="default" value="active"> <Tabs.Trigger type="default" value="active">