mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-14 20:36:55 +00:00
feat(panel-wrapper): flag to fit content height
This commit is contained in:
parent
ee0a51621e
commit
0146e154f3
@ -19,6 +19,7 @@ const DepositPanel = () => {
|
||||
return (
|
||||
<PanelWrapper
|
||||
title={getDepositTitle({ isChainParity, isTransactionConfirmation })}
|
||||
fitContentHeight={true}
|
||||
>
|
||||
{isChainParity ? (
|
||||
<ChainParity />
|
||||
|
@ -9,7 +9,7 @@ const ExitPanel = () => {
|
||||
const exitValidatorHandler = () => {}
|
||||
|
||||
return (
|
||||
<PanelWrapper title={'Exit Validator'}>
|
||||
<PanelWrapper title={'Exit Validator'} fitContentHeight={true}>
|
||||
<YStack alignItems={'flex-start'} marginTop={'6px'}>
|
||||
<Text size={15} weight="semibold">
|
||||
Validator Exit Queue
|
||||
|
@ -20,7 +20,11 @@ const PanelContent = ({
|
||||
return (
|
||||
<YStack
|
||||
space={'$3'}
|
||||
style={{ padding: isModalWidth ? 0 : '20px 30px', alignItems: 'start' }}
|
||||
style={{
|
||||
padding: isModalWidth ? 0 : '20px 30px',
|
||||
alignItems: 'start',
|
||||
overflowY: 'scroll',
|
||||
}}
|
||||
>
|
||||
{isModalWidth && (
|
||||
<XStack
|
||||
|
@ -9,9 +9,14 @@ import PanelContent from './PanelContent'
|
||||
type PanelWrapperProps = {
|
||||
children: React.ReactNode
|
||||
title: string
|
||||
fitContentHeight?: boolean
|
||||
}
|
||||
|
||||
const PanelWrapper = ({ children, title }: PanelWrapperProps) => {
|
||||
const PanelWrapper = ({
|
||||
children,
|
||||
title,
|
||||
fitContentHeight,
|
||||
}: PanelWrapperProps) => {
|
||||
const [isModalOpen, setIsModalOpen] = useState(true)
|
||||
const navigate = useNavigate()
|
||||
const { validatorName } = useParams()
|
||||
@ -36,6 +41,7 @@ const PanelWrapper = ({ children, title }: PanelWrapperProps) => {
|
||||
margin: 'auto',
|
||||
scrollbarWidth: 'thin',
|
||||
scrollbarColor: 'transparent transparent',
|
||||
height: fitContentHeight ? 'fit-content' : 'auto',
|
||||
},
|
||||
overlay: {
|
||||
zIndex: 2,
|
||||
|
Loading…
x
Reference in New Issue
Block a user