From a4ef63da37c4c53335eb21ea5e26bdd0808045ea Mon Sep 17 00:00:00 2001 From: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com> Date: Tue, 13 Sep 2022 09:20:07 -0500 Subject: [PATCH] [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 --- libs/components/src/button/button.directive.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libs/components/src/button/button.directive.ts b/libs/components/src/button/button.directive.ts index 827c49c22d..b36da8620e 100644 --- a/libs/components/src/button/button.directive.ts +++ b/libs/components/src/button/button.directive.ts @@ -11,6 +11,10 @@ const buttonStyles: Record = { "hover:tw-border-primary-700", "focus:tw-bg-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: [ "tw-bg-transparent", @@ -22,6 +26,9 @@ const buttonStyles: Record = { "focus:tw-bg-secondary-500", "focus:tw-border-secondary-500", "focus:!tw-text-contrast", + "disabled:tw-bg-transparent", + "disabled:tw-border-text-muted/60", + "disabled:!tw-text-muted/60", ], danger: [ "tw-bg-transparent", @@ -33,6 +40,9 @@ const buttonStyles: Record = { "focus:tw-bg-danger-500", "focus:tw-border-danger-500", "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-text-center", "hover:tw-no-underline", - "disabled:tw-bg-secondary-100", - "disabled:tw-border-secondary-100", - "disabled:!tw-text-main", "focus:tw-outline-none", "focus:tw-ring", "focus:tw-ring-offset-2",