feat(panel-wrapper): add title for every panel
This commit is contained in:
parent
c4b75bb4c1
commit
0db2a06c8d
|
@ -20,10 +20,7 @@ const DepositPanel = () => {
|
|||
}
|
||||
|
||||
return (
|
||||
<PanelWrapper>
|
||||
<Text size={19} weight={'semibold'}>
|
||||
Deposit Funds
|
||||
</Text>
|
||||
<PanelWrapper title={'Deposit Funds'}>
|
||||
{isChainParity ? (
|
||||
<ChainParity />
|
||||
) : (
|
||||
|
|
|
@ -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={{
|
||||
|
|
|
@ -15,5 +15,6 @@ type Story = StoryObj<typeof meta>
|
|||
export const WrappedMigratePanel: Story = {
|
||||
args: {
|
||||
children: <MigratePanel />,
|
||||
title: 'Migrate Validator',
|
||||
},
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue