@allxsmith/bestax-bulma 5.1.3 → 5.2.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/dist/index.cjs.js
CHANGED
|
@@ -2239,7 +2239,7 @@ const DialogContainer = () => {
|
|
|
2239
2239
|
};
|
|
2240
2240
|
|
|
2241
2241
|
const validButtonColors = [...validColors, 'text', 'ghost'];
|
|
2242
|
-
const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWidth, isOutlined, isInverted, isFocused, isActive, isHovered, isDisabled, className, children, textColor, bgColor, as = 'button', href, onClick, target, rel, ...props }) => {
|
|
2242
|
+
const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWidth, isOutlined, isInverted, isFocused, isActive, isHovered, isDisabled, className, children, textColor, bgColor, as: Component = 'button', href, onClick, target, rel, ...props }) => {
|
|
2243
2243
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2244
2244
|
color: textColor,
|
|
2245
2245
|
backgroundColor: bgColor,
|
|
@@ -2262,9 +2262,9 @@ const Button = ({ color, size, isLight, isRounded, isLoading, isStatic, isFullWi
|
|
|
2262
2262
|
'is-fullwidth': isFullWidth,
|
|
2263
2263
|
});
|
|
2264
2264
|
const buttonClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
2265
|
-
if (
|
|
2265
|
+
if (Component !== 'button') {
|
|
2266
2266
|
const { type: _type, disabled: _disabled, form: _form, formAction: _formAction, formEncType: _formEncType, formMethod: _formMethod, formNoValidate: _formNoValidate, formTarget: _formTarget, name: _name, value: _value, autoFocus: _autoFocus, ...anchorRest } = rest;
|
|
2267
|
-
return (jsxRuntime.jsx(
|
|
2267
|
+
return (jsxRuntime.jsx(Component, { className: buttonClasses, href: href, target: target, rel: rel, "aria-disabled": isDisabled, tabIndex: isDisabled ? -1 : undefined, onClick: isDisabled
|
|
2268
2268
|
? (e) => e.preventDefault()
|
|
2269
2269
|
: onClick, ...anchorRest, children: children }));
|
|
2270
2270
|
}
|
|
@@ -2677,7 +2677,7 @@ const Image = ({ as, className, textColor, bgColor, size, isRounded, isRetina, s
|
|
|
2677
2677
|
return (jsxRuntime.jsx(Tag, { className: imageClasses, ...rest, children: content }));
|
|
2678
2678
|
};
|
|
2679
2679
|
|
|
2680
|
-
const Link = ({ className, textColor, bgColor, isActive, children, ...props }) => {
|
|
2680
|
+
const Link = ({ className, textColor, bgColor, isActive, as: Component = 'a', children, ...props }) => {
|
|
2681
2681
|
const { bulmaHelperClasses, rest } = useBulmaClasses({
|
|
2682
2682
|
color: textColor,
|
|
2683
2683
|
backgroundColor: bgColor,
|
|
@@ -2687,7 +2687,7 @@ const Link = ({ className, textColor, bgColor, isActive, children, ...props }) =
|
|
|
2687
2687
|
'is-active': isActive,
|
|
2688
2688
|
});
|
|
2689
2689
|
const linkClasses = classNames(bulmaClasses, bulmaHelperClasses, className);
|
|
2690
|
-
return (jsxRuntime.jsx(
|
|
2690
|
+
return (jsxRuntime.jsx(Component, { className: linkClasses || undefined, ...rest, children: children }));
|
|
2691
2691
|
};
|
|
2692
2692
|
|
|
2693
2693
|
const ListItem = ({ className, textColor, bgColor, children, ...props }) => {
|