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 { 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>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue