feat(panel-wrapper): add title for every panel

This commit is contained in:
RadoslavDimchev 2024-02-23 10:24:39 +02:00 committed by Emil Ivanichkov
parent c4b75bb4c1
commit 0db2a06c8d
4 changed files with 9 additions and 9 deletions

View File

@ -20,10 +20,7 @@ const DepositPanel = () => {
}
return (
<PanelWrapper>
<Text size={19} weight={'semibold'}>
Deposit Funds
</Text>
<PanelWrapper title={'Deposit Funds'}>
{isChainParity ? (
<ChainParity />
) : (

View File

@ -12,10 +12,7 @@ const MigratePanel = () => {
const migrateValidatorHandler = () => {}
return (
<PanelWrapper>
<Text size={19} weight={'semibold'}>
Migrate Validator
</Text>
<PanelWrapper title={'Migrate Validator'}>
<YStack
space={'$3'}
style={{

View File

@ -15,5 +15,6 @@ type Story = StoryObj<typeof meta>
export const WrappedMigratePanel: Story = {
args: {
children: <MigratePanel />,
title: 'Migrate Validator',
},
}

View File

@ -1,12 +1,17 @@
import { Text } from '@status-im/components'
import { YStack } from 'tamagui'
type PanelWrapperProps = {
children: React.ReactNode
title: string
}
const PanelWrapper = ({ children }: PanelWrapperProps) => {
const PanelWrapper = ({ children, title }: PanelWrapperProps) => {
return (
<YStack space={'$3'} style={{ padding: '30px', alignItems: 'start' }}>
<Text size={19} weight={'semibold'}>
{title}
</Text>
{children}
</YStack>
)