import * as React from 'react'; import {Overlays} from './component/modal/core/overlay_stack/overlays/Overlays'; import {Button, Switcher} from './component'; import {INTENT} from './constants'; import './style.css'; import '../../app/src/scss/main.scss'; const style: React.CSSProperties = { position: 'relative', width: '100%', height: '100vh', overflow: 'auto', backgroundSize: '60px 60px', backgroundPosition: '0 0, 0 30px, 30px -30px, -30px 0px' }; export const storyLayout = (storyFn: any) => { const [theme, setTheme] = React.useState('light'); const [hasChess, setChess] = React.useState(false); if (theme === 'dark') { style.backgroundColor = '#242424'; if (hasChess) { // eslint-disable-next-line max-len style.backgroundImage = 'linear-gradient(45deg, #292929 25%, transparent 25%), linear-gradient(-45deg, #292929 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #292929 75%), linear-gradient(-45deg, transparent 75%, #292929 75%)'; } else { style.backgroundImage = 'none'; } } else { style.backgroundColor = '#fff'; if (hasChess) { // eslint-disable-next-line max-len style.backgroundImage = 'linear-gradient(45deg, #f6f6f6 25%, transparent 25%), linear-gradient(-45deg, #f6f6f6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f6f6f6 75%), linear-gradient(-45deg, transparent 75%, #f6f6f6 75%)'; } else { style.backgroundImage = 'none'; } } return (
setChess(!hasChess)}/>
{storyFn()}
); };