diff --git a/apps/angular-test-app/src/app/components/ui-elements-demo/ui-elements-demo.component.html b/apps/angular-test-app/src/app/components/ui-elements-demo/ui-elements-demo.component.html index 263c159fe..7c2496145 100644 --- a/apps/angular-test-app/src/app/components/ui-elements-demo/ui-elements-demo.component.html +++ b/apps/angular-test-app/src/app/components/ui-elements-demo/ui-elements-demo.component.html @@ -77,6 +77,8 @@

Buttons

+ + Link @@ -85,6 +87,8 @@

Buttons

+ + Link @@ -93,6 +97,8 @@

Buttons

+ + Link diff --git a/apps/angular-test-app/src/app/components/ui-elements-demo/ui-elements-demo.component.scss b/apps/angular-test-app/src/app/components/ui-elements-demo/ui-elements-demo.component.scss index 5d48dfce9..f887d79d4 100644 --- a/apps/angular-test-app/src/app/components/ui-elements-demo/ui-elements-demo.component.scss +++ b/apps/angular-test-app/src/app/components/ui-elements-demo/ui-elements-demo.component.scss @@ -8,6 +8,15 @@ margin-bottom: $uxg-spacing-4; } +.button-default-test, +.button-stroked-test, +.button-flat-test + { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr; + grid-gap: $uxg-spacing-3; +} + .mat-button-base + .mat-button-base, .mat-icon + .mat-icon, .mat-card + .mat-card, diff --git a/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button default.snap.png b/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button default.snap.png index fcf4ad741..01ece5748 100644 Binary files a/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button default.snap.png and b/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button default.snap.png differ diff --git a/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button flat.snap.png b/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button flat.snap.png index c99dedbcd..e9e3fd993 100644 Binary files a/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button flat.snap.png and b/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button flat.snap.png differ diff --git a/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button stroked.snap.png b/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button stroked.snap.png index 33caa9b2e..0d6c6ccd6 100644 Binary files a/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button stroked.snap.png and b/cypress/snapshots/ui-elements.spec.js/UI Elements -- match button stroked.snap.png differ diff --git a/themes/angular-theme/lib/button/_button-theme.scss b/themes/angular-theme/lib/button/_button-theme.scss index 0e490f743..937663aec 100644 --- a/themes/angular-theme/lib/button/_button-theme.scss +++ b/themes/angular-theme/lib/button/_button-theme.scss @@ -5,7 +5,8 @@ @mixin theme($theme) { $primary: map.get($theme, primary); $accent: map.get($theme, accent); - $warn: map.get($theme, warn); + $success: map.get($theme, success); + $error: map.get($theme, error); $foreground: map.get($theme, foreground); .mat-stroked-button { @@ -17,19 +18,54 @@ border-color: palette.get-color-from-palette($accent, default, 0.5); } + &.mat-error { + border-color: palette.get-color-from-palette($error, default, 0.5); + } + + &.mat-success { + border-color: palette.get-color-from-palette($success, default, 0.5); + } + &[disabled] { background-color: palette.get-color-from-palette($foreground, text, 0.1); border-color: palette.get-color-from-palette($foreground, text, 0.25); } } + .mat-flat-button { + &.mat-error { + background: palette.get-color-from-palette($error, default); + color: palette.get-color-from-palette($error, default-contrast); + } + &.mat-success { + background: palette.get-color-from-palette($success, default); + color: palette.get-color-from-palette($success, default-contrast); + } + } + + .mat-error { + color: palette.get-color-from-palette($error, default); + + .mat-button-focus-overlay { + background: palette.get-color-from-palette($error, default); + } + } + + .mat-success { + color: palette.get-color-from-palette($success, default); + + .mat-button-focus-overlay { + background: palette.get-color-from-palette($success, default); + } + } + .mat-flat-button, .mat-raised-button, .mat-fab, .mat-mini-fab { &.mat-primary, - &.mat-accent, - &.mat-warn { + &.mat-accent + { & .mat-ripple-element { // since the use of CSS variables, // opacity is already set on rgba background-color. @@ -54,8 +90,8 @@ opacity: 0.24; } - &.mat-warn .mat-button-focus-overlay { - background: palette.get-color-from-palette($warn, default-contrast); + &.mat-success .mat-button-focus-overlay { + background: palette.get-color-from-palette($success, default-contrast); opacity: 0.24; } }