@greghowe79/the-lib 2.2.9 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/button/button.qwik.cjs +1 -1
- package/lib/components/button/button.qwik.mjs +1 -1
- package/lib/components/button/button.utils.qwik.cjs +3 -1
- package/lib/components/button/button.utils.qwik.mjs +3 -1
- package/lib-types/components/button/button.d.ts +2 -0
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ const button_utils = require("./button.utils.qwik.cjs");
|
|
|
8
8
|
const Button = qwik.component$(({ id, label, variant = "primary", icon, disabled = false, ariaLabel, type = "button", size = "md", onClick$, isLoading, active = false, customColors }) => {
|
|
9
9
|
qwik.useStylesScoped$(styles);
|
|
10
10
|
const loading = typeof isLoading === "object" && isLoading !== null && "value" in isLoading ? isLoading.value : isLoading;
|
|
11
|
-
const hasCustomStyles = customColors && (customColors.bg || customColors.text || customColors.border);
|
|
11
|
+
const hasCustomStyles = customColors && (customColors.bg || customColors.text || customColors.border || customColors.padding || customColors.width);
|
|
12
12
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13
13
|
children: [
|
|
14
14
|
hasCustomStyles && /* @__PURE__ */ jsxRuntime.jsx("style", {
|
|
@@ -6,7 +6,7 @@ import { generateCustomCSS } from "./button.utils.qwik.mjs";
|
|
|
6
6
|
const Button = component$(({ id, label, variant = "primary", icon, disabled = false, ariaLabel, type = "button", size = "md", onClick$, isLoading, active = false, customColors }) => {
|
|
7
7
|
useStylesScoped$(styles);
|
|
8
8
|
const loading = typeof isLoading === "object" && isLoading !== null && "value" in isLoading ? isLoading.value : isLoading;
|
|
9
|
-
const hasCustomStyles = customColors && (customColors.bg || customColors.text || customColors.border);
|
|
9
|
+
const hasCustomStyles = customColors && (customColors.bg || customColors.text || customColors.border || customColors.padding || customColors.width);
|
|
10
10
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
11
11
|
children: [
|
|
12
12
|
hasCustomStyles && /* @__PURE__ */ jsx("style", {
|
|
@@ -10,7 +10,9 @@ function generateCustomCSS(id, colors) {
|
|
|
10
10
|
colors.bg && `background: ${colors.bg} !important;`,
|
|
11
11
|
colors.bg && isGradient(colors.bg) && gradientFix,
|
|
12
12
|
colors.text && `color: ${colors.text} !important;`,
|
|
13
|
-
colors.border && `border: 2px solid ${colors.border} !important
|
|
13
|
+
colors.border && `border: 2px solid ${colors.border} !important;`,
|
|
14
|
+
colors.padding && `padding: ${colors.padding} !important;`,
|
|
15
|
+
colors.width && `width: ${colors.width} !important;`
|
|
14
16
|
].filter(Boolean).join("\n");
|
|
15
17
|
const hoverBg = colors.hoverBg || colors.bg;
|
|
16
18
|
const hoverText = colors.hoverText || colors.text;
|
|
@@ -8,7 +8,9 @@ function generateCustomCSS(id, colors) {
|
|
|
8
8
|
colors.bg && `background: ${colors.bg} !important;`,
|
|
9
9
|
colors.bg && isGradient(colors.bg) && gradientFix,
|
|
10
10
|
colors.text && `color: ${colors.text} !important;`,
|
|
11
|
-
colors.border && `border: 2px solid ${colors.border} !important
|
|
11
|
+
colors.border && `border: 2px solid ${colors.border} !important;`,
|
|
12
|
+
colors.padding && `padding: ${colors.padding} !important;`,
|
|
13
|
+
colors.width && `width: ${colors.width} !important;`
|
|
12
14
|
].filter(Boolean).join("\n");
|
|
13
15
|
const hoverBg = colors.hoverBg || colors.bg;
|
|
14
16
|
const hoverText = colors.hoverText || colors.text;
|