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
33 lines
817 B
JavaScript
33 lines
817 B
JavaScript
import * as React from 'react';
|
|
import { CssVarsProvider, extendTheme } from '@mui/joy/styles';
|
|
import colors from '@mui/joy/colors';
|
|
import Box from '@mui/joy/Box';
|
|
import ScopedCssBaseline from '@mui/joy/ScopedCssBaseline';
|
|
|
|
const theme = extendTheme({
|
|
colorSchemes: {
|
|
forest: {
|
|
palette: {
|
|
mode: 'dark',
|
|
background: {
|
|
body: colors.green[200],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
export default function JoyScopedCssBaseline() {
|
|
return (
|
|
<CssVarsProvider theme={theme}>
|
|
<ScopedCssBaseline
|
|
data-joy-color-scheme="forest"
|
|
sx={{ width: 300, height: 100, overflow: 'scroll', bgcolor: 'background.body' }}
|
|
>
|
|
{/* The scrollbar should be dark */}
|
|
<Box sx={{ height: 1000 }} />
|
|
</ScopedCssBaseline>
|
|
</CssVarsProvider>
|
|
);
|
|
}
|