Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(alert): add component tokens #10218

Merged
merged 18 commits into from
Sep 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(alert): add component tokens
aPreciado88 committed Sep 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit e37596851c453ac344bc92cd8437a4a9c71be756
29 changes: 13 additions & 16 deletions packages/calcite-components/src/components/alert/alert.e2e.ts
Original file line number Diff line number Diff line change
@@ -585,22 +585,19 @@ describe("calcite-alert", () => {
});

describe("theme", () => {
describe("default", () => {
themed(html`<calcite-alert label="this is a default alert" scale="s" open> </calcite-alert>`, {
/*"--calcite-alert-width": {
selector: "calcite-alert",
shadowSelector: `.${CSS.container}`,
targetProp: "inlineSize",
},*/
"--calcite-alert-background-color": {
shadowSelector: `.${CSS.container}`,
targetProp: "backgroundColor",
},
"--calcite-alert-corner-radius": {
shadowSelector: `.${CSS.container}`,
targetProp: "borderRadius",
},
});
themed(html`<calcite-alert label="this is a default alert" scale="s" open> </calcite-alert>`, {
/*"--calcite-alert-width": {
shadowSelector: `.${CSS.container}`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you search for --calcite-alert-width in the SCSS you will see it only applies to :host so you can remove the shadowSelector here. Either explicitly set selector: "calcite-alert" or take it off completely.

targetProp: "inlineSize",
},*/
"--calcite-alert-background-color": {
shadowSelector: `.${CSS.container}`,
targetProp: "backgroundColor",
},
"--calcite-alert-corner-radius": {
shadowSelector: `.${CSS.container}`,
targetProp: "borderRadius",
},
});
});
});