Skip to content

Saleor Core: the high performance, composable, headless commerce API.

fix input active styles

Krzysztof Bialoglowicz5d1626fbdad8
diff --git a/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsx b/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsx
index 7095c16983..a21cf06f94 100644
--- a/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsx
+++ b/saleor/static/dashboard-next/components/RichTextEditor/RichTextEditor.tsx
@@ -102,7 +102,7 @@ const styles = (theme: Theme) =>
"&:hover": {
borderColor: theme.palette.primary.main
},
- border: `1px rgba(0, 0, 0, 0.23) solid`,
+ border: `1px #3d3d3d solid`,
borderTopLeftRadius: 4,
borderTopRightRadius: 4,
padding: "27px 12px 10px",
diff --git a/saleor/static/dashboard-next/components/Theme/ThemeProvider.tsx b/saleor/static/dashboard-next/components/Theme/ThemeProvider.tsx
index 5bb0703636..f36f511bd2 100644
--- a/saleor/static/dashboard-next/components/Theme/ThemeProvider.tsx
+++ b/saleor/static/dashboard-next/components/Theme/ThemeProvider.tsx
@@ -24,10 +24,10 @@ const dark: IThemeColors = {
disabled: "rgba(32, 33, 36, 0.6)"
},
input: {
+ border: "#FCFCFC",
default: "#25262A",
disabled: "none",
- focused: "#25262A",
- text: "#9E9D9D",
+ text: "#FCFCFC",
textHover: "#616161"
},
paperBorder: "#252728",
@@ -52,10 +52,10 @@ const light: IThemeColors = {
disabled: "rgba(216, 216, 216, 0.3)"
},
input: {
+ border: "#3D3D3D",
default: "#FFFFFF",
disabled: "#EAEAEA",
- focused: "#FFFFFF",
- text: "#9D9D9D",
+ text: "#3D3D3D",
textHover: "#616161"
},
paperBorder: "#EAEAEA",
diff --git a/saleor/static/dashboard-next/discounts/components/SalePricing/SalePricing.tsx b/saleor/static/dashboard-next/discounts/components/SalePricing/SalePricing.tsx
index 2aed0a2d9b..4f5fb3790f 100644
--- a/saleor/static/dashboard-next/discounts/components/SalePricing/SalePricing.tsx
+++ b/saleor/static/dashboard-next/discounts/components/SalePricing/SalePricing.tsx
@@ -96,6 +96,9 @@ const SalePricing = withStyles(styles, {
label={i18n.t("Start Date")}
value={data.startDate}
type="date"
+ InputLabelProps={{
+ shrink: true
+ }}
fullWidth
/>
<TextField
@@ -107,6 +110,9 @@ const SalePricing = withStyles(styles, {
label={i18n.t("End Date")}
value={data.endDate}
type="date"
+ InputLabelProps={{
+ shrink: true
+ }}
fullWidth
/>
</CardContent>
diff --git a/saleor/static/dashboard-next/discounts/components/VoucherDates/VoucherDates.tsx b/saleor/static/dashboard-next/discounts/components/VoucherDates/VoucherDates.tsx
index 7194ba7a4e..93d04a7285 100644
--- a/saleor/static/dashboard-next/discounts/components/VoucherDates/VoucherDates.tsx
+++ b/saleor/static/dashboard-next/discounts/components/VoucherDates/VoucherDates.tsx
@@ -38,6 +38,9 @@ const VoucherDates = ({
label={i18n.t("Start Date")}
value={data.startDate}
type="date"
+ InputLabelProps={{
+ shrink: true
+ }}
fullWidth
/>
<TextField
@@ -49,6 +52,9 @@ const VoucherDates = ({
label={i18n.t("Start Hour")}
value={data.startTime}
type="time"
+ InputLabelProps={{
+ shrink: true
+ }}
fullWidth
/>
</Grid>
@@ -69,6 +75,9 @@ const VoucherDates = ({
label={i18n.t("End Date")}
value={data.endDate}
type="date"
+ InputLabelProps={{
+ shrink: true
+ }}
fullWidth
/>
<TextField
@@ -80,6 +89,9 @@ const VoucherDates = ({
label={i18n.t("End Hour")}
value={data.endTime}
type="time"
+ InputLabelProps={{
+ shrink: true
+ }}
fullWidth
/>
</Grid>
diff --git a/saleor/static/dashboard-next/theme.ts b/saleor/static/dashboard-next/theme.ts
index 9b40023c5f..4064ca8d52 100644
--- a/saleor/static/dashboard-next/theme.ts
+++ b/saleor/static/dashboard-next/theme.ts
@@ -22,7 +22,7 @@ export type IThemeColors = Record<
gray: Record<"default" | "disabled", string>;
} & {
input: Record<
- "default" | "focused" | "disabled" | "text" | "textHover",
+ "default" | "border" | "disabled" | "text" | "textHover",
string
>;
};
@@ -71,6 +71,11 @@ export default (colors: IThemeColors): Theme =>
flexDirection: "row-reverse" as "row-reverse"
}
},
+ MuiFormLabel: {
+ filled: {
+ color: [[colors.primary], "!important"] as any
+ }
+ },
MuiIconButton: {
root: {
"&:hover": {
@@ -113,7 +118,7 @@ export default (colors: IThemeColors): Theme =>
}
},
root: {
- color: [[colors.input.text], "!important"] as any
+ color: colors.input.text
},
shrink: {
width: "133%"
@@ -161,6 +166,9 @@ export default (colors: IThemeColors): Theme =>
padding: "25px 12px 8px 12px"
},
root: {
+ "& fieldset": {
+ borderColor: [[colors.input.border], "!important"] as any
+ },
"& legend": {
display: "none"
},
@@ -181,7 +189,7 @@ export default (colors: IThemeColors): Theme =>
},
"&:hover": {
"& fieldset": {
- borderColor: colors.primary + "!important"
+ borderColor: [[colors.primary], "!important"] as any
},
"& input": {
color: colors.input.textHover,