aboutsummaryrefslogtreecommitdiff
path: root/src/components/Window/WindowSurface/WindowSurface.js
blob: d1d151010a0c3427242cbee9725a1ebad51bdc0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React from 'react';

import { Paper, makeStyles } from "@material-ui/core";


const useStyles = makeStyles(theme => ({
  surface: {
    position: 'absolute',
    display: 'flex',
    flexDirection: 'column',
    background: theme.palette.background.elevation,
  }
}));


const WindowSurface = ({ size, position, children }) => {
  const classes = useStyles();

  return (
    <Paper
      elevation={3}
      style={{...size, ...position}}
      className={classes.surface}
    >
      {children}
    </Paper>
  )
};


export default WindowSurface;