Skip to content

Commit 9ba20a3

Browse files
committed
docs(button): adjust static colors template
Adjust static colors template to better handle the static color decorator and gradients.
1 parent b751042 commit 9ba20a3

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

components/closebutton/stories/closebutton.stories.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,29 +55,25 @@ export default {
5555
},
5656
};
5757

58-
const CloseButton = ({
59-
staticColor,
60-
...args
61-
}) => {
58+
const CloseButton = (args) => {
6259
return html`
6360
<div
6461
style=${ifDefined(styleMap({
6562
padding: "1rem",
66-
backgroundColor: staticColor === "white" ? "rgb(15, 121, 125)" : staticColor === "black" ? "rgb(181, 209, 211)" : undefined,
6763
}))}
6864
>
69-
${Template({...args, staticColor})}
65+
${Template(args)}
7066
${when(window.isChromatic(), () =>
7167
html`
7268
${Template({
73-
...args,
74-
isDisabled: true,
75-
})}
69+
...args,
70+
isDisabled: true,
71+
})}
7672
${html`
7773
<div
7874
style=${ifDefined(styleMap({
7975
padding: "1rem",
80-
backgroundColor: "rgb(15, 121, 125)"
76+
background: "var(--spectrum-examples-gradient-static-white)"
8177
}))}
8278
>
8379
${Template({
@@ -95,7 +91,7 @@ const CloseButton = ({
9591
<div
9692
style=${ifDefined(styleMap({
9793
padding: "1rem",
98-
backgroundColor: "rgb(181, 209, 211)"
94+
background: "var(--spectrum-examples-gradient-static-black)"
9995
}))}
10096
>
10197
${Template({
@@ -113,7 +109,7 @@ const CloseButton = ({
113109
)}
114110
</div>
115111
`;
116-
}
112+
};
117113

118114
export const Default = CloseButton.bind({});
119115
Default.args = {};

0 commit comments

Comments
 (0)