From ff39ee7c0e5ed3f0378844ee129a51fbd494c5ea Mon Sep 17 00:00:00 2001 From: chgibb Date: Wed, 11 Sep 2019 22:33:46 -0400 Subject: [PATCH] lint --- .../containers/overlays/overlay.tsx | 126 +++++++++--------- 1 file changed, 65 insertions(+), 61 deletions(-) diff --git a/src/req/renderer/views/circularGenomeBuilderView/containers/overlays/overlay.tsx b/src/req/renderer/views/circularGenomeBuilderView/containers/overlays/overlay.tsx index ebcfae836..e9aca85a1 100644 --- a/src/req/renderer/views/circularGenomeBuilderView/containers/overlays/overlay.tsx +++ b/src/req/renderer/views/circularGenomeBuilderView/containers/overlays/overlay.tsx @@ -1,23 +1,23 @@ import * as React from "react"; import Draggable from "react-draggable"; -import { style } from "typestyle"; +import {style} from "typestyle"; -import { Drawer } from "../../../../components/drawer"; -import { Grid } from "../../../../components/grid"; -import { BorderLeftOutlined } from "../../../../components/icons/borderLeftOutlined"; -import { IconButton } from "../../../../components/iconButton"; -import { Paper, PaperProps } from "../../../../components/paper"; -import { blue } from "../../../../styles/colours"; -import { BorderTopOutlined } from "../../../../components/icons/borderTopOutlined"; -import { BorderBottomOutlined } from "../../../../components/icons/borderBottomOutlined"; -import { BorderRightOutlined } from "../../../../components/icons/borderRightOutlined"; -import { BorderHorizontalOutlined } from "../../../../components/icons/borderHorizontalOutlined"; -import { Dialog } from "../../../../components/dialog"; -import { ChevronLeft } from "../../../../components/icons/chevronLeft"; -import { ArrowUpwardOutlined } from "../../../../components/icons/arrowUpwareOutlined"; -import { ArrowDownwardOutlined } from "../../../../components/icons/arrowDownwardOutlined"; -import { ChevronRight } from "../../../../components/icons/chevronRight"; -import { Close } from "../../../../components/icons/close"; +import {Drawer} from "../../../../components/drawer"; +import {Grid} from "../../../../components/grid"; +import {BorderLeftOutlined} from "../../../../components/icons/borderLeftOutlined"; +import {IconButton} from "../../../../components/iconButton"; +import {Paper, PaperProps} from "../../../../components/paper"; +import {blue} from "../../../../styles/colours"; +import {BorderTopOutlined} from "../../../../components/icons/borderTopOutlined"; +import {BorderBottomOutlined} from "../../../../components/icons/borderBottomOutlined"; +import {BorderRightOutlined} from "../../../../components/icons/borderRightOutlined"; +import {BorderHorizontalOutlined} from "../../../../components/icons/borderHorizontalOutlined"; +import {Dialog} from "../../../../components/dialog"; +import {ChevronLeft} from "../../../../components/icons/chevronLeft"; +import {ArrowUpwardOutlined} from "../../../../components/icons/arrowUpwareOutlined"; +import {ArrowDownwardOutlined} from "../../../../components/icons/arrowDownwardOutlined"; +import {ChevronRight} from "../../../../components/icons/chevronRight"; +import {Close} from "../../../../components/icons/close"; export type OverlayRestriction = "noDrawerLeft" | "noDrawerRight" | "noDrawerBottom" | "noDrawerTop" | "noModal"; @@ -30,7 +30,8 @@ export interface OverlayProps { children: JSX.Element; } -function DraggablePaper(props: PaperProps) { +function DraggablePaper(props: PaperProps) +{ return ( @@ -43,16 +44,17 @@ function IconKindSelect(props: { restrictions: OverlayProps["restrictions"], setOverlayKind: (newKind: OverlayProps["kind"]) => void, onClose: OverlayProps["onClose"] -}): JSX.Element { +}): JSX.Element +{ return (
+ style={{marginBottom: "3vh"}}> props.setOverlayKind("drawerLeft")} > @@ -62,7 +64,7 @@ function IconKindSelect(props: { props.setOverlayKind("drawerTop")} > @@ -73,7 +75,7 @@ function IconKindSelect(props: { props.setOverlayKind("drawerBottom")} > @@ -82,7 +84,7 @@ function IconKindSelect(props: { props.setOverlayKind("drawerRight")} > @@ -92,7 +94,7 @@ function IconKindSelect(props: { props.setOverlayKind("modal")} > @@ -101,7 +103,7 @@ function IconKindSelect(props: { { @@ -123,47 +125,49 @@ const drawer = style({ marginTop: "6.5vh" }); -export function Overlay(props: OverlayProps): JSX.Element | null { +export function Overlay(props: OverlayProps): JSX.Element | null +{ let [kind, setKind] = React.useState(props.kind); - switch (kind) { - case "drawerLeft": - case "drawerTop": - case "drawerBottom": - case "drawerRight": - return ( - -
- - - {props.children} - -
-
- ); - case "modal": - return ( - + switch (kind) + { + case "drawerLeft": + case "drawerTop": + case "drawerBottom": + case "drawerRight": + return ( + +
{props.children} -
- ); +
+ + ); + case "modal": + return ( + + + + {props.children} + + + ); } return null;