mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-12 19:36:35 +00:00
feat(panel-content): separate to new component
This commit is contained in:
parent
cf97c7a26e
commit
d2492afdba
29
src/pages/ManageValidator/RightManagePanels/PanelContent.tsx
Normal file
29
src/pages/ManageValidator/RightManagePanels/PanelContent.tsx
Normal file
@ -0,0 +1,29 @@
|
||||
import { Text } from '@status-im/components'
|
||||
import { ExpandRsIcon } from '@status-im/icons'
|
||||
import { XStack, YStack } from 'tamagui'
|
||||
|
||||
type PanelContentProps = {
|
||||
children: React.ReactNode
|
||||
title: string
|
||||
closeModal: () => void
|
||||
}
|
||||
|
||||
const PanelContent = ({ children, title, closeModal }: PanelContentProps) => {
|
||||
return (
|
||||
<YStack space={'$3'} style={{ padding: '30px', alignItems: 'start' }}>
|
||||
<XStack style={{ width: '100%', justifyContent: 'space-between' }}>
|
||||
<Text size={19} weight={'semibold'}>
|
||||
{title}
|
||||
</Text>
|
||||
<ExpandRsIcon
|
||||
size={20}
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={closeModal}
|
||||
/>
|
||||
</XStack>
|
||||
{children}
|
||||
</YStack>
|
||||
)
|
||||
}
|
||||
|
||||
export default PanelContent
|
Loading…
x
Reference in New Issue
Block a user