Skip to content

Commit 4957db6

Browse files
committed
improve word wrap behaviour in update boxes
1 parent 578f450 commit 4957db6

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

src/ui/screens/profile-screen/components/ProfileDataList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const ProfileDataList = () => {
2929
key={index}
3030
gap={4}
3131
sx={{
32-
padding: 4,
32+
padding: { xs: 2, sm: 4 },
3333
borderRadius: theme.shape.borderRadius,
3434
backgroundColor: 'white.main',
3535
}}

src/ui/screens/profile-screen/components/ProfileUpdateField.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const ProfileUpdateField = ({
2222
gap: 2,
2323
border: `1px solid ${theme.palette.white.dark}`,
2424
boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.25)',
25-
padding: 4,
25+
padding: { xs: 2, sm: 4 },
2626
borderRadius: theme.shape.borderRadius,
2727
}}>
2828
<VBox>
@@ -57,7 +57,7 @@ const ProfileUpdateField = ({
5757
}
5858
</VBox>
5959
<HBox sx={{
60-
padding: "32px",
60+
padding: { xs: 0, sm: 4 },
6161
backgroundColor: 'white.main',
6262
borderRadius: theme.shape.borderRadius
6363
}}>

src/ui/screens/question-pages/components/input-types/ProfileInputMultiSelection.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ const ProfileInputMultiSelection = ({
5252
{Object.entries(choices).map(([key, label]) => (
5353
<FormControlLabel
5454
key={key}
55-
sx={{ mb: 2 }}
5655
control={
5756
<Checkbox
5857
checked={Array.isArray(value) ? value.includes(key) : false}
@@ -61,6 +60,15 @@ const ProfileInputMultiSelection = ({
6160
/>
6261
}
6362
label={label}
63+
sx={{
64+
mb: 2,
65+
alignItems: "flex-start",
66+
'& .MuiFormControlLabel-label': {
67+
whiteSpace: "normal",
68+
wordBreak: "break-word",
69+
overflowWrap: "anywhere",
70+
},
71+
}}
6472
/>
6573
))}
6674
</FormGroup>

src/ui/screens/question-pages/components/input-types/ProfileInputSelection.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ const ProfileInputSelection = ({
4747
/>
4848
}
4949
label={opt.label}
50+
sx={{
51+
alignItems: "flex-start",
52+
'& .MuiFormControlLabel-label': {
53+
whiteSpace: "normal",
54+
wordBreak: "break-word",
55+
overflowWrap: "anywhere",
56+
},
57+
}}
5058
/>
5159
))}
5260
</RadioGroup>

0 commit comments

Comments
 (0)