@spectrum-css/actionbutton
Advanced tools
Comparing version 5.0.12 to 5.0.13
@@ -6,2 +6,9 @@ # Change Log | ||
<a name="5.0.13"></a> | ||
##5.0.13 | ||
🗓 | ||
2023-11-09 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/actionbutton@5.0.12...@spectrum-css/actionbutton@5.0.13) | ||
**Note:** Version bump only for package @spectrum-css/actionbutton | ||
<a name="5.0.12"></a> | ||
@@ -8,0 +15,0 @@ ##5.0.12 |
{ | ||
"name": "@spectrum-css/actionbutton", | ||
"version": "5.0.12", | ||
"version": "5.0.13", | ||
"description": "The Spectrum CSS action button component", | ||
@@ -27,3 +27,3 @@ "license": "Apache-2.0", | ||
"@spectrum-css/icon": "^4.0.3", | ||
"@spectrum-css/tokens": "^12.0.0", | ||
"@spectrum-css/tokens": "^13.0.0", | ||
"gulp": "^4.0.0" | ||
@@ -34,3 +34,3 @@ }, | ||
}, | ||
"gitHead": "db5d42ecb6d0ba5fca5b7511f4cc9d8e58e637ae" | ||
"gitHead": "394fdd27405bd2ecbf1aec96da58a72150b3fc9e" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { argTypes, ActionButtons } from "./index"; | ||
import { ActionButtons, argTypes } from "./index"; | ||
@@ -16,4 +16,3 @@ export default { | ||
hasPopup: false, | ||
backgroundColor: "rgb(181, 209, 211)", | ||
staticColor: "black", | ||
staticColor: "black", | ||
}, | ||
@@ -20,0 +19,0 @@ parameters: { |
@@ -1,2 +0,2 @@ | ||
import { argTypes, ActionButtons } from "./index"; | ||
import { ActionButtons, argTypes } from "./index"; | ||
@@ -16,4 +16,3 @@ export default { | ||
hasPopup: false, | ||
backgroundColor: "rgb(15, 121, 125)", | ||
staticColor: "white", | ||
staticColor: "white", | ||
}, | ||
@@ -20,0 +19,0 @@ parameters: { |
import { html } from "lit"; | ||
import { ifDefined } from "lit/directives/if-defined.js"; | ||
import { styleMap } from "lit/directives/style-map.js"; | ||
// Import the component markup template | ||
import { Template } from "./template"; | ||
@@ -99,11 +100,16 @@ | ||
export const ActionButtons = (args) => { | ||
export const ActionButtons = ({ | ||
staticColor, | ||
...args | ||
}) => { | ||
return html` | ||
<div | ||
style="padding: 1rem; ${args.staticColor && args.backgroundColor | ||
? `background-color: ${args.backgroundColor}` | ||
: ""}" | ||
style=${ifDefined(styleMap({ | ||
padding: "1rem", | ||
backgroundColor: staticColor === "white" ? "rgb(15, 121, 125)" : staticColor === "black" ? "rgb(181, 209, 211)" : undefined, | ||
}))} | ||
> | ||
${Template({ | ||
...args, | ||
staticColor, | ||
label: "More", | ||
@@ -114,2 +120,3 @@ iconName: undefined, | ||
...args, | ||
staticColor, | ||
label: "More", | ||
@@ -119,5 +126,7 @@ })} | ||
...args, | ||
staticColor, | ||
})} | ||
${Template({ | ||
...args, | ||
staticColor, | ||
hasPopup: true, | ||
@@ -124,0 +133,0 @@ })} |
import { html } from "lit"; | ||
import { classMap } from "lit/directives/class-map.js"; | ||
import { ifDefined } from "lit/directives/if-defined.js"; | ||
import { styleMap } from "lit/directives/style-map.js"; | ||
import { when } from "lit/directives/when.js"; | ||
import { lowerCase, capitalize } from "lodash-es"; | ||
import { capitalize, lowerCase } from "lodash-es"; | ||
@@ -25,2 +26,3 @@ import { Template as Icon } from "@spectrum-css/icon/stories/template.js"; | ||
customClasses = [], | ||
customStyles = {}, | ||
customIconClasses = [], | ||
@@ -60,2 +62,3 @@ onclick, | ||
role=${ifDefined(role)} | ||
style=${ifDefined(styleMap(customStyles))} | ||
?disabled=${isDisabled} | ||
@@ -62,0 +65,0 @@ @click=${onclick} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
309642
2481