Skip to content

Commit

Permalink
fix(Input): fix styles on the input label and info message
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulo Lagoá committed Jun 12, 2023
1 parent 7bf3d81 commit 089cff1
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const StyledTypography = styled(
$infoDisabled: boolean;
$gutter: boolean;
}) => ({
color: theme.forms.infoMessage.textColor,
display: "inline-block",
...($infoDisabled && {
color: theme.colors.secondary_60,
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/components/Forms/Label/Label.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const StyledTypography = styled(
$labelDisabled: boolean;
$childGutter: boolean;
}) => ({
fontWeight: theme.forms.label.fontWeight,
display: "inline-block",
...($labelDisabled && {
color: theme.colors.secondary_60,
Expand Down
8 changes: 8 additions & 0 deletions packages/styles/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,14 @@ const componentsSpec: DeepString<HvThemeComponents> = {
drawer: {
backDropBackgroundColor: "string",
},
forms: {
infoMessage: {
textColor: "string",
},
label: {
fontWeight: "string",
},
},
};

const typographyProps: DeepString<HvThemeTypographyProps> = {
Expand Down
8 changes: 8 additions & 0 deletions packages/styles/src/themes/ds3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,14 @@ const ds3 = makeTheme((theme: HvTheme) => ({
drawer: {
backDropBackgroundColor: theme.colors.atmo4,
},
forms: {
infoMessage: {
textColor: theme.colors.secondary,
},
label: {
fontWeight: theme.fontWeights.semibold,
},
},
}));

export default ds3;
8 changes: 8 additions & 0 deletions packages/styles/src/themes/ds5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,14 @@ const ds5 = makeTheme((theme: HvTheme) => ({
drawer: {
backDropBackgroundColor: theme.colors.atmo4,
},
forms: {
infoMessage: {
textColor: theme.colors.secondary_80,
},
label: {
fontWeight: theme.fontWeights.normal,
},
},
}));

export default ds5;
8 changes: 8 additions & 0 deletions packages/styles/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,14 @@ export type HvThemeComponents = {
drawer: {
backDropBackgroundColor: CSSProperties["backgroundColor"];
};
forms: {
infoMessage: {
textColor: string;
};
label: {
fontWeight: string;
};
};
};

// Theme typography
Expand Down

0 comments on commit 089cff1

Please sign in to comment.