@indico-data/design-system 2.32.0 → 2.32.1
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/index.css +8 -0
- package/lib/index.esm.css +8 -0
- package/lib/index.esm.js +2 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/button/Button.tsx +5 -3
- package/src/components/button/styles/Button.scss +9 -0
package/lib/index.js
CHANGED
|
@@ -5543,6 +5543,7 @@ const Button$2 = React$1.forwardRef((props, ref) => {
|
|
|
5543
5543
|
[`btn--${color}`]: color,
|
|
5544
5544
|
[`btn--${variant}`]: variant,
|
|
5545
5545
|
[`btn--${size}`]: size,
|
|
5546
|
+
'btn--icon-only': !children && iconName,
|
|
5546
5547
|
'btn--loading': isLoading,
|
|
5547
5548
|
}, className);
|
|
5548
5549
|
const handleOnClick = (event) => {
|
|
@@ -5550,7 +5551,7 @@ const Button$2 = React$1.forwardRef((props, ref) => {
|
|
|
5550
5551
|
onClick(event);
|
|
5551
5552
|
}
|
|
5552
5553
|
};
|
|
5553
|
-
return (jsxRuntime.jsxs("button", Object.assign({ ref: ref, disabled: isLoading || isDisabled, className: buttonClasses, role: "button", onClick: handleOnClick, "aria-label": ariaLabel || 'button', "aria-disabled": isLoading || isDisabled, "aria-busy": isLoading, type: type, onMouseEnter: onMouseEnter, onMouseLeave: onMouseExit, onKeyDown: onKeyDown }, rest, { children: [isLoading && (jsxRuntime.jsx(Icon, { name: "fa-circle-notch", style: { animation: 'spin 1s linear infinite' }, className: "mr-2", ariaLabel: "Loading..." })), !children && iconName && jsxRuntime.jsx(Icon, { name: iconName, ariaLabel: `${iconName} Icon
|
|
5554
|
+
return (jsxRuntime.jsxs("button", Object.assign({ ref: ref, disabled: isLoading || isDisabled, className: buttonClasses, role: "button", onClick: handleOnClick, "aria-label": ariaLabel || 'button', "aria-disabled": isLoading || isDisabled, "aria-busy": isLoading, type: type, onMouseEnter: onMouseEnter, onMouseLeave: onMouseExit, onKeyDown: onKeyDown }, rest, { children: [isLoading && (jsxRuntime.jsx(Icon, { name: "fa-circle-notch", style: { animation: 'spin 1s linear infinite' }, className: "mr-2", ariaLabel: "Loading...", size: size })), !children && iconName && jsxRuntime.jsx(Icon, { name: iconName, ariaLabel: `${iconName} Icon`, size: size }), children && iconPosition === 'left' && iconName && (jsxRuntime.jsx(Icon, { name: iconName, className: "mr-2", ariaLabel: `${iconName} Icon`, size: size })), children, children && iconPosition === 'right' && iconName && (jsxRuntime.jsx(Icon, { name: iconName, className: "ml-2", ariaLabel: `${iconName} Icon`, size: size }))] })));
|
|
5554
5555
|
});
|
|
5555
5556
|
|
|
5556
5557
|
function ownKeys$2(object, enumerableOnly) {
|