Skip to content

Commit 8b986d7

Browse files
driskullbenelan
authored andcommitted
fix(action): reflect the icon property (#11282)
**Related Issue:** #11092 ## Summary - reflect icon property - add test
1 parent 5d60d36 commit 8b986d7

File tree

2 files changed

+51
-2
lines changed

2 files changed

+51
-2
lines changed

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

+50-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { newE2EPage } from "@arcgis/lumina-compiler/puppeteerTesting";
22
import { describe, expect, it } from "vitest";
3-
import { accessible, disabled, hidden, renders, slots, t9n, defaults, themed } from "../../tests/commonTests";
3+
import { accessible, disabled, hidden, renders, slots, t9n, defaults, themed, reflects } from "../../tests/commonTests";
44
import { html } from "../../../support/formatting";
55
import { CSS, SLOTS } from "./resources";
66

@@ -42,6 +42,55 @@ describe("calcite-action", () => {
4242
]);
4343
});
4444

45+
describe("reflects", () => {
46+
reflects("calcite-action", [
47+
{
48+
propertyName: "active",
49+
value: true,
50+
},
51+
{
52+
propertyName: "alignment",
53+
value: "end",
54+
},
55+
{
56+
propertyName: "appearance",
57+
value: "solid",
58+
},
59+
{
60+
propertyName: "compact",
61+
value: true,
62+
},
63+
{
64+
propertyName: "disabled",
65+
value: true,
66+
},
67+
{
68+
propertyName: "icon",
69+
value: "hamburger",
70+
},
71+
{
72+
propertyName: "iconFlipRtl",
73+
value: true,
74+
},
75+
{
76+
propertyName: "indicator",
77+
value: true,
78+
},
79+
{
80+
propertyName: "loading",
81+
value: true,
82+
},
83+
{
84+
propertyName: "scale",
85+
value: "m",
86+
},
87+
{
88+
propertyName: "textEnabled",
89+
value: true,
90+
},
91+
]);
92+
});
93+
4594
describe("renders", () => {
4695
renders("calcite-action", { display: "flex" });
4796
});

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class Action extends LitElement implements InteractiveComponent, Loadable
7676
@property({ reflect: true }) disabled = false;
7777

7878
/** Specifies an icon to display. */
79-
@property() icon: IconNameOrString;
79+
@property({ reflect: true }) icon: IconNameOrString;
8080

8181
/** When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */
8282
@property({ reflect: true }) iconFlipRtl = false;

0 commit comments

Comments
 (0)