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