From bfa9f7b9158faa3a453eaabf5be3c96b6c8a18b1 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 10 Oct 2020 13:39:08 +0300 Subject: refactor: remove demo components from lib --- src/demo/Window/WindowSurface.tsx | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/demo/Window/WindowSurface.tsx (limited to 'src/demo/Window/WindowSurface.tsx') diff --git a/src/demo/Window/WindowSurface.tsx b/src/demo/Window/WindowSurface.tsx new file mode 100644 index 0000000..1900901 --- /dev/null +++ b/src/demo/Window/WindowSurface.tsx @@ -0,0 +1,44 @@ +import React from 'react'; + +import { Paper, makeStyles } from '@material-ui/core'; + +import { SurfaceSize, SurfacePosition } from './types'; + + +interface PropTypes { + size: SurfaceSize; + position: SurfacePosition; +} + + +const useStyles = makeStyles(theme => ({ + surface: { + position: 'absolute', + display: 'flex', + flexDirection: 'column', + overflowY: 'auto', + scrollbarColor: `${theme.palette.secondary.dark} ${theme.palette.secondary.light}`, + + '& a.MuiTypography-root': { + color: theme.palette.primary.light, + }, + }, +})); + + +const WindowSurface: React.FC = ({ size, position, children }) => { + const classes = useStyles(); + + return ( + + {children} + + ); +}; + + +export default WindowSurface; -- cgit v1.2.3