feat(panel-wrapper): wrap with react modal

This commit is contained in:
RadoslavDimchev 2024-04-15 09:46:50 +03:00 committed by Radoslav Dimchev
parent c4f1277b4f
commit 72dca8496d
1 changed files with 13 additions and 6 deletions

View File

@ -1,4 +1,6 @@
import { Text } from '@status-im/components'
import { useState } from 'react'
import ReactModal from 'react-modal'
import { YStack } from 'tamagui'
type PanelWrapperProps = {
@ -7,13 +9,18 @@ type PanelWrapperProps = {
}
const PanelWrapper = ({ children, title }: PanelWrapperProps) => {
const [isModalOpen, setIsModalOpen] = useState(true)
return (
<YStack space={'$3'} style={{ padding: '30px', alignItems: 'start' }}>
<Text size={19} weight={'semibold'}>
{title}
</Text>
{children}
</YStack>
<ReactModal
isOpen={isModalOpen}
>
<YStack space={'$3'} style={{ padding: '30px', alignItems: 'start' }}>
<Text size={19} weight={'semibold'}>
{title}
</Text>
{children}
</YStack>
</ReactModal>
)
}