Skip to content

Commit cea9dd8

Browse files
committed
Add mobile
1 parent f8b5513 commit cea9dd8

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

site/src/components/FormCloseButton/FormCloseButton.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ const useStyles = makeStyles((theme) => ({
4747
"&:hover": {
4848
opacity: 1,
4949
},
50+
51+
[theme.breakpoints.down("md")]: {
52+
top: theme.spacing(1),
53+
right: theme.spacing(1),
54+
},
5055
},
5156
label: {
5257
position: "absolute",

site/src/components/FullPageForm/FullPageHorizontalForm.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ const useStyles = makeStyles((theme) => ({
4242
title: {
4343
paddingTop: theme.spacing(6),
4444
paddingBottom: theme.spacing(8),
45+
46+
[theme.breakpoints.down("md")]: {
47+
paddingTop: theme.spacing(4),
48+
paddingBottom: theme.spacing(4),
49+
},
4550
},
4651

4752
main: {

site/src/pages/CreateWorkspacePage/CreateWorkspacePageView.tsx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export const CreateWorkspacePageView: FC<
164164
return (
165165
<FullPageHorizontalForm title="New workspace" onCancel={props.onCancel}>
166166
<form onSubmit={form.handleSubmit}>
167-
<Stack direction="column" spacing={10}>
167+
<Stack direction="column" spacing={10} className={styles.formSections}>
168168
{/* General info */}
169169
<div className={styles.formSection}>
170170
<div className={styles.formSectionInfo}>
@@ -299,17 +299,33 @@ export const CreateWorkspacePageView: FC<
299299
}
300300

301301
const useStyles = makeStyles((theme) => ({
302+
formSections: {
303+
[theme.breakpoints.down("md")]: {
304+
gap: theme.spacing(8),
305+
},
306+
},
307+
302308
formSection: {
303309
display: "flex",
304310
alignItems: "flex-start",
305311
gap: theme.spacing(15),
312+
313+
[theme.breakpoints.down("md")]: {
314+
flexDirection: "column",
315+
gap: theme.spacing(2),
316+
},
306317
},
307318

308319
formSectionInfo: {
309320
width: 312,
310321
flexShrink: 0,
311322
position: "sticky",
312323
top: theme.spacing(3),
324+
325+
[theme.breakpoints.down("md")]: {
326+
width: "100%",
327+
position: "initial",
328+
},
313329
},
314330

315331
formSectionInfoTitle: {
@@ -360,12 +376,21 @@ const useStyles = makeStyles((theme) => ({
360376
const useFormFooterStyles = makeStyles((theme) => ({
361377
button: {
362378
minWidth: theme.spacing(23),
379+
380+
[theme.breakpoints.down("md")]: {
381+
width: "100%",
382+
},
363383
},
364384
footer: {
365385
display: "flex",
366386
alignItems: "center",
367387
justifyContent: "flex-start",
368388
flexDirection: "row-reverse",
369389
gap: theme.spacing(2),
390+
391+
[theme.breakpoints.down("md")]: {
392+
flexDirection: "column",
393+
gap: theme.spacing(1),
394+
},
370395
},
371396
}))

0 commit comments

Comments
 (0)