Skip to content

Commit ca7fa30

Browse files
authored
UX form field label style (#1428)
1 parent df4c63e commit ca7fa30

File tree

10 files changed

+53
-4
lines changed

10 files changed

+53
-4
lines changed

portal-ui/src/screens/Console/Buckets/BucketDetails/AddReplicationModal.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ const styles = (theme: Theme) =>
6464
},
6565
"& div:first-child": {
6666
marginBottom: 0,
67+
"@media (max-width: 600px)": {
68+
marginTop: "7px",
69+
},
6770
},
6871
},
6972
...spacingUtils,

portal-ui/src/screens/Console/Buckets/BucketDetails/SetAccessPolicy.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import createStyles from "@mui/styles/createStyles";
2222
import withStyles from "@mui/styles/withStyles";
2323
import Grid from "@mui/material/Grid";
2424
import {
25+
formFieldStyles,
2526
modalStyleUtils,
2627
spacingUtils,
2728
} from "../../Common/FormComponents/common/styleLibrary";
@@ -37,14 +38,14 @@ const styles = (theme: Theme) =>
3738
createStyles({
3839
codeMirrorContainer: {
3940
marginBottom: 20,
40-
paddingLeft: 15,
4141
"& label": {
4242
marginBottom: ".5rem",
4343
},
4444
"& label + div": {
4545
display: "none",
4646
},
4747
},
48+
...formFieldStyles,
4849
...modalStyleUtils,
4950
...spacingUtils,
5051
});

portal-ui/src/screens/Console/Common/CredentialsPrompt/CredentialItem.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { Theme } from "@mui/material/styles";
2222
import createStyles from "@mui/styles/createStyles";
2323
import CopyToClipboard from "react-copy-to-clipboard";
2424
import { CopyIcon } from "../../../../icons";
25+
import { fieldBasic } from "../FormComponents/common/styleLibrary";
2526

2627
const styles = (theme: Theme) =>
2728
createStyles({
@@ -50,8 +51,8 @@ const styles = (theme: Theme) =>
5051
},
5152
},
5253
inputLabel: {
54+
...fieldBasic.inputLabel,
5355
fontSize: ".8rem",
54-
fontWeight: 600,
5556
},
5657
});
5758

portal-ui/src/screens/Console/Common/FormComponents/CSVMultiSelector/CSVMultiSelector.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ const styles = (theme: Theme) => {
6161
marginBottom: 7,
6262
},
6363
inputLabel: {
64+
...fieldBasic.inputLabel,
6465
margin: 0,
6566
alignItems: "flex-start",
6667
paddingTop: "20px",
67-
minWidth: 170,
68+
minWidth: 162,
6869
},
6970
});
7071
};

portal-ui/src/screens/Console/Common/FormComponents/CodeMirrorWrapper/CodeMirrorWrapper.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ interface ICodeWrapper {
5050
const styles = (theme: Theme) =>
5151
createStyles({
5252
...fieldBasic,
53+
inputLabel: {
54+
...fieldBasic.inputLabel,
55+
fontWeight: "normal",
56+
},
5357
});
5458

5559
const langHighlight: Record<string, any> = {

portal-ui/src/screens/Console/Common/FormComponents/FileSelector/FileSelector.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ const styles = (theme: Theme) =>
6464
},
6565
},
6666
...fileInputStyles,
67+
inputLabel: {
68+
...fieldBasic.inputLabel,
69+
fontWeight: "normal",
70+
},
71+
textBoxContainer: {
72+
...fieldBasic.textBoxContainer,
73+
maxWidth: "100%",
74+
border: "1px solid #eaeaea",
75+
paddingLeft: "15px",
76+
},
6777
});
6878

6979
const FileSelector = ({

portal-ui/src/screens/Console/Common/FormComponents/InputBoxWrapper/InputBoxWrapper.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ const styles = (theme: Theme) =>
8282
top: 5,
8383
},
8484
},
85+
inputLabel: {
86+
...fieldBasic.inputLabel,
87+
fontWeight: "normal",
88+
},
8589
});
8690

8791
const inputStyles = makeStyles((theme: Theme) =>

portal-ui/src/screens/Console/Common/FormComponents/SelectWrapper/SelectWrapper.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ const styles = (theme: Theme) =>
5151
createStyles({
5252
...fieldBasic,
5353
...tooltipHelper,
54+
inputLabel: {
55+
...fieldBasic.inputLabel,
56+
"& span": {
57+
fontWeight: "normal",
58+
},
59+
},
60+
fieldContainer: {
61+
display: "flex",
62+
"@media (max-width: 600px)": {
63+
flexFlow: "column",
64+
},
65+
},
5466
});
5567

5668
const SelectStyled = withStyles((theme: Theme) =>

portal-ui/src/screens/Console/Common/FormComponents/common/styleLibrary.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ const inputLabelBase = {
2323
color: "#07193E",
2424
textAlign: "left" as const,
2525
overflow: "hidden",
26+
alignItems: "center",
27+
display: "flex",
2628
"& span": {
2729
display: "flex",
2830
alignItems: "center",
2931
},
30-
display: "flex",
3132
};
3233

3334
export const fieldBasic: any = {
@@ -46,6 +47,9 @@ export const fieldBasic: any = {
4647
position: "relative" as const,
4748
display: "flex" as const,
4849
flexWrap: "wrap",
50+
"@media (max-width: 600px)": {
51+
flexFlow: "column",
52+
},
4953
},
5054
tooltipContainer: {
5155
marginLeft: 5,

portal-ui/src/screens/Console/NotificationEndpoints/CustomForms/EditConfiguration.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,21 @@ const EditConfiguration = ({
197197
paddingTop: "15px ",
198198
textAlign: "right" as const,
199199
maxHeight: "60px",
200+
display: "flex",
201+
alignItems: "center",
202+
justifyContent: "flex-end",
200203
}}
201204
>
202205
<Button
203206
type="button"
204207
variant="outlined"
205208
color="secondary"
209+
sx={{
210+
padding: {
211+
xs: "3px", //avoid wrapping on smaller screens
212+
md: "20px",
213+
},
214+
}}
206215
onClick={() => {
207216
setResetConfigurationOpen(true);
208217
}}

0 commit comments

Comments
 (0)