Skip to content

Commit c47743d

Browse files
authored
fix(panel): fix --calcite-panel-header-action-text-color-press (#12110)
1 parent 19eedc7 commit c47743d

File tree

4 files changed

+26
-1
lines changed

4 files changed

+26
-1
lines changed

packages/calcite-components/src/components/panel/panel.e2e.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,29 @@ describe("calcite-panel", () => {
735735
shadowSelector: `.${CSS.contentWrapper}`,
736736
targetProp: "backgroundColor",
737737
},
738+
"--calcite-panel-header-action-background-color": {
739+
shadowSelector: `.${CSS.menuAction}`,
740+
targetProp: "--calcite-action-background-color",
741+
},
742+
"--calcite-panel-header-action-background-color-hover": {
743+
shadowSelector: `.${CSS.menuAction}`,
744+
targetProp: "--calcite-action-background-color-hover",
745+
state: "hover",
746+
},
747+
"--calcite-panel-header-action-background-color-press": {
748+
shadowSelector: `.${CSS.menuAction}`,
749+
targetProp: "--calcite-action-background-color-press",
750+
state: { press: `calcite-panel >>> .${CSS.menuAction}` },
751+
},
752+
"--calcite-panel-header-action-text-color": {
753+
shadowSelector: `.${CSS.menuAction}`,
754+
targetProp: "--calcite-action-text-color",
755+
},
756+
"--calcite-panel-header-action-text-color-press": {
757+
shadowSelector: `.${CSS.menuAction}`,
758+
targetProp: "--calcite-action-text-color-press",
759+
state: { press: `calcite-panel >>> .${CSS.menuAction}` },
760+
},
738761
"--calcite-panel-header-background-color": {
739762
shadowSelector: `.${CSS.header}`,
740763
targetProp: "backgroundColor",

packages/calcite-components/src/components/panel/panel.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ calcite-action-menu {
173173
--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);
174174
--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);
175175
--calcite-action-text-color: var(--calcite-panel-header-action-text-color);
176-
--calcite-action-text-color-pressed: var(--calcite-panel-header-action-text-color-pressed);
176+
--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press);
177177
}
178178

179179
.back-button {

packages/calcite-components/src/components/panel/panel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ export class Panel extends LitElement implements InteractiveComponent {
524524
placement={menuPlacement}
525525
>
526526
<calcite-action
527+
class={CSS.menuAction}
527528
icon={ICONS.menu}
528529
scale={this.scale}
529530
slot={ACTION_MENU_SLOTS.trigger}

packages/calcite-components/src/components/panel/resources.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const CSS = {
2222
footerStart: "footer-start",
2323
footerEnd: "footer-end",
2424
headerSlottedContent: "header-slotted-content",
25+
menuAction: "menu-action",
2526
};
2627

2728
export const IDS = {

0 commit comments

Comments
 (0)