aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components/Window/WindowSurface.tsx
diff options
context:
space:
mode:
authorEug-VS <eug-vs@keemail.me>2020-02-03 14:51:10 +0300
committerEug-VS <eug-vs@keemail.me>2020-02-03 14:51:10 +0300
commit5bcc9b41e59bf7215abf395ea899cdbc2d06db9a (patch)
tree4281d872404091155d1ddeaa5727bc5fb51fdd8a /src/lib/components/Window/WindowSurface.tsx
parentf223bc71ea10d16fed68016ba708cd5f24fc6110 (diff)
downloadreact-benzin-5bcc9b41e59bf7215abf395ea899cdbc2d06db9a.tar.gz
feat: use React.FC<PropTypes> syntax
This approach is better because it allows to use destructuring right in a function declaration without explicitly defining children propety in PropTypes
Diffstat (limited to 'src/lib/components/Window/WindowSurface.tsx')
-rw-r--r--src/lib/components/Window/WindowSurface.tsx4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/components/Window/WindowSurface.tsx b/src/lib/components/Window/WindowSurface.tsx
index aaaa984..701a767 100644
--- a/src/lib/components/Window/WindowSurface.tsx
+++ b/src/lib/components/Window/WindowSurface.tsx
@@ -8,7 +8,6 @@ import { SurfaceSize, SurfacePosition } from './types';
interface PropTypes {
size: SurfaceSize;
position: SurfacePosition;
- children?: any;
}
@@ -27,9 +26,8 @@ const useStyles = makeStyles((theme: any) => ({
}));
-const WindowSurface = (props: PropTypes) => {
+const WindowSurface: React.FC<PropTypes> = ({ size, position, children }) => {
const classes = useStyles();
- const { size, position, children } = props;
return (
<Paper