2022-05-31 20:24:28 +00:00
|
|
|
import { FC } from 'react';
|
|
|
|
import { Box } from '@mui/material';
|
2022-02-17 21:01:56 +00:00
|
|
|
|
2021-05-20 19:21:03 +00:00
|
|
|
import { BORDER_RADIUS, DIVIDER } from '../../lib/consts/DEFAULT_THEME';
|
2021-03-29 22:40:17 +00:00
|
|
|
|
2022-05-31 20:24:28 +00:00
|
|
|
const InnerPanelHeader: FC = ({ children }) => (
|
|
|
|
<Box sx={{ position: 'relative', whiteSpace: 'pre-wrap' }}>
|
|
|
|
<Box
|
|
|
|
sx={{
|
2022-06-23 22:56:03 +00:00
|
|
|
alignItems: 'center',
|
2022-05-31 20:24:28 +00:00
|
|
|
borderColor: DIVIDER,
|
|
|
|
borderRadius: BORDER_RADIUS,
|
|
|
|
borderStyle: 'solid',
|
|
|
|
borderWidth: '1px',
|
|
|
|
display: 'flex',
|
|
|
|
left: '-.3em',
|
|
|
|
paddingBottom: '.2em',
|
|
|
|
paddingLeft: '1em',
|
|
|
|
paddingRight: '.7em',
|
|
|
|
paddingTop: '.4em',
|
|
|
|
position: 'absolute',
|
|
|
|
top: '-.3em',
|
|
|
|
width: '100%',
|
|
|
|
zIndex: '10',
|
|
|
|
|
|
|
|
'& > :first-child': {
|
|
|
|
flexGrow: 1,
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</Box>
|
2022-05-31 21:42:25 +00:00
|
|
|
<Box
|
|
|
|
sx={{
|
2022-06-23 22:56:03 +00:00
|
|
|
display: 'flex',
|
2022-05-31 21:42:25 +00:00
|
|
|
paddingBottom: '.4em',
|
|
|
|
paddingRight: '1.7em',
|
|
|
|
visibility: 'hidden',
|
|
|
|
}}
|
|
|
|
>
|
2022-06-23 22:56:03 +00:00
|
|
|
{children}
|
2022-05-31 20:24:28 +00:00
|
|
|
</Box>
|
|
|
|
</Box>
|
2022-03-19 02:23:36 +00:00
|
|
|
);
|
2021-03-29 22:40:17 +00:00
|
|
|
|
2022-02-17 21:01:56 +00:00
|
|
|
export default InnerPanelHeader;
|