From cc6c8e9109f1807ce48b061fa497535ab9f674e8 Mon Sep 17 00:00:00 2001 From: Eug-VS Date: Mon, 3 Feb 2020 16:37:43 +0300 Subject: feat: change src structure --- src/lib/Window/WindowSurface.tsx | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/lib/Window/WindowSurface.tsx (limited to 'src/lib/Window/WindowSurface.tsx') diff --git a/src/lib/Window/WindowSurface.tsx b/src/lib/Window/WindowSurface.tsx new file mode 100644 index 0000000..701a767 --- /dev/null +++ b/src/lib/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: any) => ({ + 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 From d50ac5ba261d1da6f367bd0e9e02da11f9de5921 Mon Sep 17 00:00:00 2001 From: Eug-VS Date: Thu, 6 Feb 2020 19:46:51 +0300 Subject: fix: get rid of all ESlint warnings --- src/lib/Window/WindowSurface.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/Window/WindowSurface.tsx') diff --git a/src/lib/Window/WindowSurface.tsx b/src/lib/Window/WindowSurface.tsx index 701a767..a65e398 100644 --- a/src/lib/Window/WindowSurface.tsx +++ b/src/lib/Window/WindowSurface.tsx @@ -11,7 +11,7 @@ interface PropTypes { } -const useStyles = makeStyles((theme: any) => ({ +const useStyles = makeStyles(theme => ({ surface: { position: 'absolute', display: 'flex', -- cgit v1.2.3