From 54bf130ed51418a3012674e14c4a0cb837bd5734 Mon Sep 17 00:00:00 2001 From: Presley Pizzo Date: Fri, 29 Jul 2022 19:59:20 +0000 Subject: [PATCH] Add elements --- site/src/components/Section/Section.tsx | 4 ++-- .../WorkspaceScheduleForm.tsx | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/site/src/components/Section/Section.tsx b/site/src/components/Section/Section.tsx index 9e2b993ed3..7cdb7efa85 100644 --- a/site/src/components/Section/Section.tsx +++ b/site/src/components/Section/Section.tsx @@ -30,7 +30,7 @@ export const Section: SectionFC = ({ }) => { const styles = useStyles({ layout }) return ( -
+
{(title || description) && (
@@ -49,7 +49,7 @@ export const Section: SectionFC = ({ {alert &&
{alert}
} {children}
-
+
) } diff --git a/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx b/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx index 6eb500550f..dbc88319cf 100644 --- a/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx +++ b/site/src/components/WorkspaceScheduleForm/WorkspaceScheduleForm.tsx @@ -6,8 +6,10 @@ import FormHelperText from "@material-ui/core/FormHelperText" import FormLabel from "@material-ui/core/FormLabel" import MenuItem from "@material-ui/core/MenuItem" import makeStyles from "@material-ui/core/styles/makeStyles" +import Switch from "@material-ui/core/Switch" import TextField from "@material-ui/core/TextField" import { ErrorSummary } from "components/ErrorSummary/ErrorSummary" +import { Section } from "components/Section/Section" import dayjs from "dayjs" import advancedFormat from "dayjs/plugin/advancedFormat" import duration from "dayjs/plugin/duration" @@ -215,6 +217,11 @@ export const WorkspaceScheduleForm: FC = ({
{submitScheduleError && } +
+ } + label="Auto-start" + /> = ({ {form.errors.monday && {Language.errorNoDayOfWeek}} +
+
+ } + label="Auto-Stop" + /> = ({ label={Language.ttlLabel} type="number" /> +