feat(panel-wrapper): wrap with react modal
This commit is contained in:
parent
c4f1277b4f
commit
72dca8496d
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue