Skip to content

Commit

Permalink
fix(components): color for disabled state (#2234)
Browse files Browse the repository at this point in the history
  • Loading branch information
owilliams320 authored Sep 4, 2024
1 parent b7b9327 commit 179b78f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion libs/components/src/textarea/textarea.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ export default {
},
args: {
style: 'outlined',
disabled: false,
},
};

const Template = ({ label, style, required, helper }) => {
const Template = ({ label, style, disabled, required, helper }) => {
return `
<cv-textarea
label="${label ?? style}"
${style}
${helper ? `helper="${helper}"` : null}
${disabled ? `disabled` : null}
${required ? `required` : null}>
</cv-textarea>`;
};
Expand Down
2 changes: 2 additions & 0 deletions libs/components/src/textfield/textfield.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
--mdc-text-field-outlined-hover-border-color: var(
--mdc-theme-text-icon-on-background
);
--mdc-text-field-outlined-disabled-border-color: var(--cv-theme-outline-12);
--mdc-text-field-disabled-ink-color: var(--cv-theme-on-surface-38);
--mdc-typography-subtitle1-font-family: var(
--mdc-typography-body1-font-family
);
Expand Down
12 changes: 11 additions & 1 deletion libs/components/src/textfield/textfield.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ export default {
},
args: {
style: 'outlined',
disabled: false,
},
};

const Template = ({ icon, iconTrailing, label, style, required, helper }) => {
const Template = ({
icon,
iconTrailing,
label,
style,
disabled,
required,
helper,
}) => {
return `
<cv-textfield
label="${label ?? style}"
Expand All @@ -26,6 +35,7 @@ const Template = ({ icon, iconTrailing, label, style, required, helper }) => {
: null
}
${helper ? `helper="${helper}"` : null}
${disabled ? `disabled` : null}
${required ? `required` : null}>
</cv-textfield>`;
};
Expand Down

0 comments on commit 179b78f

Please sign in to comment.