parent
fb8e92ffb4
commit
15942d258d
3 changed files with 53 additions and 18 deletions
@ -1,17 +1,20 @@ |
|||||||
import { Box, BoxProps } from '@mui/material'; |
import { Box, BoxProps, SxProps, Theme } from '@mui/material'; |
||||||
import { FC } from 'react'; |
import { FC, useMemo } from 'react'; |
||||||
|
|
||||||
const InnerPanelBody: FC<BoxProps> = ({ sx, ...innerPanelBodyRestProps }) => ( |
const InnerPanelBody: FC<BoxProps> = ({ sx, ...innerPanelBodyRestProps }) => { |
||||||
<Box |
const combinedSx = useMemo<SxProps<Theme>>( |
||||||
{...{ |
() => ({ |
||||||
...innerPanelBodyRestProps, |
position: 'relative', |
||||||
sx: { |
zIndex: 20, |
||||||
padding: '.3em .7em', |
|
||||||
|
|
||||||
...sx, |
...sx, |
||||||
}, |
}), |
||||||
}} |
[sx], |
||||||
/> |
|
||||||
); |
); |
||||||
|
|
||||||
|
return ( |
||||||
|
<Box padding=".3em .7em" {...innerPanelBodyRestProps} sx={combinedSx} /> |
||||||
|
); |
||||||
|
}; |
||||||
|
|
||||||
export default InnerPanelBody; |
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