Skip to content

Commit

Permalink
fix: Editor layout for small screens (#2554)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjon3s authored Dec 12, 2023
1 parent f9785de commit dd2dff1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion editor.planx.uk/src/@planx/components/Checklist/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const Options: React.FC<{ formik: FormikHookReturn }> = ({ formik }) => {
</IconButton>
</Box>
</Box>
<Box pl={4}>
<Box pl={{ md: 2 }}>
<ListManager
values={groupedOption.children}
onChange={(newOptions) => {
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/@planx/components/Question/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const OptionEditor: React.FC<{
},
});
}}
sx={{ width: "160px", maxWidth: "160px" }}
sx={{ width: { md: "160px" }, maxWidth: "160px" }}
/>
</InputRow>
<InputRow>
Expand Down
1 change: 0 additions & 1 deletion editor.planx.uk/src/ui/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ const StyledInputBase = styled(InputBase, {
...(format === "large" && {
backgroundColor: theme.palette.common.white,
height: 50,
fontSize: 25,
width: "100%",
fontWeight: FONT_WEIGHT_SEMI_BOLD,
}),
Expand Down
14 changes: 12 additions & 2 deletions editor.planx.uk/src/ui/ModalSectionContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,26 @@ const SectionContentGrid = styled(Grid)(({ theme }) => ({
paddingTop: theme.spacing(2),
paddingBottom: theme.spacing(2),
flexWrap: "nowrap",
[theme.breakpoints.down("md")]: {
flexDirection: "column",
alignItems: "flex-start",
},
}));

const LeftGutter = styled(Grid)(({ theme }) => ({
flex: `0 0 ${theme.spacing(6)}`,
flex: `0 0 ${theme.spacing(3)}`,
textAlign: "center",
[theme.breakpoints.up("md")]: {
flex: `0 0 ${theme.spacing(6)}`,
},
}));

const SectionContent = styled(Grid)(({ theme }) => ({
flexGrow: 1,
paddingRight: theme.spacing(6),
width: "100%",
[theme.breakpoints.up("md")]: {
paddingRight: theme.spacing(6),
},
}));

const Title = styled(Typography)(({ theme }) => ({
Expand Down

0 comments on commit dd2dff1

Please sign in to comment.