parent
fb8e92ffb4
commit
15942d258d
3 changed files with 53 additions and 18 deletions
@ -1,17 +1,20 @@ |
||||
import { Box, BoxProps } from '@mui/material'; |
||||
import { FC } from 'react'; |
||||
import { Box, BoxProps, SxProps, Theme } from '@mui/material'; |
||||
import { FC, useMemo } from 'react'; |
||||
|
||||
const InnerPanelBody: FC<BoxProps> = ({ sx, ...innerPanelBodyRestProps }) => ( |
||||
<Box |
||||
{...{ |
||||
...innerPanelBodyRestProps, |
||||
sx: { |
||||
padding: '.3em .7em', |
||||
const InnerPanelBody: FC<BoxProps> = ({ sx, ...innerPanelBodyRestProps }) => { |
||||
const combinedSx = useMemo<SxProps<Theme>>( |
||||
() => ({ |
||||
position: 'relative', |
||||
zIndex: 20, |
||||
|
||||
...sx, |
||||
}, |
||||
}} |
||||
/> |
||||
); |
||||
}), |
||||
[sx], |
||||
); |
||||
|
||||
return ( |
||||
<Box padding=".3em .7em" {...innerPanelBodyRestProps} sx={combinedSx} /> |
||||
); |
||||
}; |
||||
|
||||
export default InnerPanelBody; |
||||
|
@ -1 +1,7 @@ |
||||
type InnerPanelProps = import('@mui/material').BoxProps; |
||||
type InnerPanelOptionalProps = { |
||||
headerMarginOffset?: number | string; |
||||
mv?: number | string; |
||||
}; |
||||
|
||||
type InnerPanelProps = InnerPanelOptionalProps & |
||||
import('@mui/material').BoxProps; |
||||
|
Loading…
Reference in new issue