Files
react-test/docs/data/system/positions/ZIndex.tsx
how2ice 005cf56baf
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
init project
2025-12-12 14:26:25 +09:00

64 lines
1.4 KiB
TypeScript

import Typography from '@mui/material/Typography';
import Box from '@mui/material/Box';
export default function ZIndex() {
return (
<Typography
component="div"
variant="body1"
style={{
height: 100,
width: '100%',
position: 'relative',
}}
>
<Box
sx={(theme) => ({
bgcolor: 'grey.600',
color: 'grey.50',
border: '1px solid',
borderColor: 'grey.300',
p: 2,
borderRadius: 2,
fontSize: '0.875rem',
fontWeight: '700',
position: 'absolute',
top: 40,
left: '40%',
zIndex: 'tooltip',
...theme.applyStyles('dark', {
bgcolor: '#101010',
color: 'grey.300',
borderColor: 'grey.800',
}),
})}
>
z-index tooltip
</Box>
<Box
sx={(theme) => ({
bgcolor: '#fff',
color: 'grey.800',
border: '1px solid',
borderColor: 'grey.300',
p: 2,
borderRadius: 2,
fontSize: '0.875rem',
fontWeight: '700',
position: 'absolute',
top: 0,
left: '43%',
zIndex: 'modal',
...theme.applyStyles('dark', {
bgcolor: 'grey.800',
color: 'grey.300',
borderColor: 'grey.800',
}),
})}
>
z-index modal
</Box>
</Typography>
);
}