Skip to content

Commit

Permalink
fix FormLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed May 1, 2024
1 parent 33445aa commit 6be45c1
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions packages/mui-material/src/FormLabel/FormLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,18 @@ export const FormLabelRoot = styled('label', {
[`&.${formLabelClasses.error}`]: {
color: (theme.vars || theme).palette.error.main,
},
...Object.entries(theme.palette)
.filter(([, value]) => value.main)
.map(([color]) => ({
props: { color },
style: {
[`&.${formLabelClasses.focused}`]: {
color: (theme.vars || theme).palette[color].main,
variants: [
...Object.entries(theme.palette)
.filter(([, value]) => value.main)
.map(([color]) => ({
props: { color },
style: {
[`&.${formLabelClasses.focused}`]: {
color: (theme.vars || theme).palette[color].main,
},
},
},
})),
})),
],
}));

const AsteriskComponent = styled('span', {
Expand Down

0 comments on commit 6be45c1

Please sign in to comment.