Files
shop-server/client/src/shared/ui/DemoOverlay.tsx
T
2026-06-03 13:52:39 +05:00

57 lines
1.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Box from '@mui/material/Box'
import { useTheme } from '@mui/material/styles'
import { IS_DEMO_MODE } from '@/shared/config'
export function DemoOverlay() {
const theme = useTheme()
const isDark = theme.palette.mode === 'dark'
if (!IS_DEMO_MODE) return null
return (
<>
<Box
aria-hidden="true"
sx={{
position: 'fixed',
inset: 0,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
pointerEvents: 'none',
zIndex: 9990,
fontSize: '10vw',
fontWeight: 900,
color: isDark ? 'rgba(255,255,255,0.04)' : 'rgba(0,0,0,0.04)',
transform: 'rotate(-30deg)',
userSelect: 'none',
}}
>
ДЕМО
</Box>
<Box
aria-hidden="true"
sx={{
position: 'fixed',
bottom: 16,
right: 16,
pointerEvents: 'none',
zIndex: 9991,
px: 2,
py: 0.75,
borderRadius: 1,
fontSize: 12,
fontWeight: 600,
letterSpacing: '0.04em',
color: isDark ? 'rgba(255,255,255,0.6)' : '#fff',
bgcolor: isDark ? 'rgba(255,255,255,0.08)' : 'rgba(0,0,0,0.6)',
userSelect: 'none',
}}
>
ДЕМО-РЕЖИМ
</Box>
</>
)
}