Skip to content

Commit

Permalink
feat: add warning theme variant (#7485)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrediWa authored Jun 12, 2024
1 parent b81988c commit 437d18f
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/button/test/visual/lumo/button.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ describe('button', () => {
});
});

['contrast', 'success', 'error'].forEach((variant) => {
['contrast', 'warning', 'success', 'error'].forEach((variant) => {
describe(variant, () => {
it('primary', async () => {
element.setAttribute('theme', `primary ${variant}`);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion packages/button/theme/lumo/vaadin-button-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const button = css`
opacity: 0.2;
}
/* Colors (success, error, contrast) */
/* Colors (success, warning, error, contrast) */
:host([theme~='success']) {
color: var(--lumo-success-text-color);
Expand All @@ -179,6 +179,15 @@ const button = css`
color: var(--lumo-success-contrast-color);
}
:host([theme~='warning']) {
color: var(--lumo-warning-text-color);
}
:host([theme~='warning'][theme~='primary']) {
background-color: var(--lumo-warning-color);
color: var(--lumo-warning-contrast-color);
}
:host([theme~='error']) {
color: var(--lumo-error-text-color);
}
Expand Down

0 comments on commit 437d18f

Please sign in to comment.