[CL-44] [EC-525] Update button disabled state (#3282)

* [CL-44] Update button disabled state

* [CL-44] [EC-525] Fixed opacity issue with background/border
This commit is contained in:
Vincent Salucci 2022-09-13 09:20:07 -05:00 committed by GitHub
parent 8ff3a55821
commit a4ef63da37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -11,6 +11,10 @@ const buttonStyles: Record<ButtonTypes, string[]> = {
"hover:tw-border-primary-700", "hover:tw-border-primary-700",
"focus:tw-bg-primary-700", "focus:tw-bg-primary-700",
"focus:tw-border-primary-700", "focus:tw-border-primary-700",
"disabled:tw-bg-primary-500/60",
"disabled:tw-border-primary-500/60",
"disabled:!tw-text-contrast/60",
"disabled:tw-bg-clip-padding",
], ],
secondary: [ secondary: [
"tw-bg-transparent", "tw-bg-transparent",
@ -22,6 +26,9 @@ const buttonStyles: Record<ButtonTypes, string[]> = {
"focus:tw-bg-secondary-500", "focus:tw-bg-secondary-500",
"focus:tw-border-secondary-500", "focus:tw-border-secondary-500",
"focus:!tw-text-contrast", "focus:!tw-text-contrast",
"disabled:tw-bg-transparent",
"disabled:tw-border-text-muted/60",
"disabled:!tw-text-muted/60",
], ],
danger: [ danger: [
"tw-bg-transparent", "tw-bg-transparent",
@ -33,6 +40,9 @@ const buttonStyles: Record<ButtonTypes, string[]> = {
"focus:tw-bg-danger-500", "focus:tw-bg-danger-500",
"focus:tw-border-danger-500", "focus:tw-border-danger-500",
"focus:!tw-text-contrast", "focus:!tw-text-contrast",
"disabled:tw-bg-transparent",
"disabled:tw-border-danger-500/60",
"disabled:!tw-text-danger/60",
], ],
}; };
@ -51,9 +61,6 @@ export class ButtonDirective {
"tw-border-solid", "tw-border-solid",
"tw-text-center", "tw-text-center",
"hover:tw-no-underline", "hover:tw-no-underline",
"disabled:tw-bg-secondary-100",
"disabled:tw-border-secondary-100",
"disabled:!tw-text-main",
"focus:tw-outline-none", "focus:tw-outline-none",
"focus:tw-ring", "focus:tw-ring",
"focus:tw-ring-offset-2", "focus:tw-ring-offset-2",