@hyphen/hyphen-components 4.1.0 → 4.1.2
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/components/Button/Button.d.ts +5 -0
- package/dist/hyphen-components.cjs.development.js +7 -2
- package/dist/hyphen-components.cjs.development.js.map +1 -1
- package/dist/hyphen-components.cjs.production.min.js +1 -1
- package/dist/hyphen-components.cjs.production.min.js.map +1 -1
- package/dist/hyphen-components.esm.js +7 -2
- package/dist/hyphen-components.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/Button.mdx +3 -3
- package/src/components/Button/Button.test.tsx +9 -0
- package/src/components/Button/Button.tsx +9 -0
- package/src/components/Modal/components/ModalHeader/ModalHeader.tsx +1 -0
|
@@ -752,7 +752,7 @@ var Spinner = function Spinner(_ref) {
|
|
|
752
752
|
|
|
753
753
|
var styles$s = {"button":"Button-module_button__18Bed","size-sm":"Button-module_size-sm__6Xrjw","size-md":"Button-module_size-md__BkuGu","size-lg":"Button-module_size-lg__JVYWV","primary":"Button-module_primary__st6yY","secondary":"Button-module_secondary__j-3rj","tertiary":"Button-module_tertiary__Nd7xM","danger":"Button-module_danger__Hxs5n","size-sm-tablet":"Button-module_size-sm-tablet__9XaSx","size-md-tablet":"Button-module_size-md-tablet__YQxaI","size-lg-tablet":"Button-module_size-lg-tablet__h3l97","size-sm-desktop":"Button-module_size-sm-desktop__8tTsg","size-md-desktop":"Button-module_size-md-desktop__OCdDi","size-lg-desktop":"Button-module_size-lg-desktop__uFc4f","size-sm-hd":"Button-module_size-sm-hd__INFfD","size-md-hd":"Button-module_size-md-hd__8e2mW","size-lg-hd":"Button-module_size-lg-hd__DH60l","loading":"Button-module_loading__QfItr","label":"Button-module_label__1PsXG","full-width":"Button-module_full-width__qDri6","spinner-wrapper":"Button-module_spinner-wrapper__rALNw"};
|
|
754
754
|
|
|
755
|
-
var _excluded$I = ["asChild", "children", "className", "fullWidth", "iconPrefix", "iconSuffix", "isDisabled", "isLoading", "onClick", "onBlur", "onFocus", "shadow", "size", "variant"];
|
|
755
|
+
var _excluded$I = ["asChild", "children", "className", "fullWidth", "iconPrefix", "iconSuffix", "isDisabled", "isLoading", "onClick", "onBlur", "onFocus", "shadow", "size", "type", "variant"];
|
|
756
756
|
var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
757
757
|
var _classNames;
|
|
758
758
|
var asChild = _ref.asChild,
|
|
@@ -769,6 +769,8 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
769
769
|
shadow = _ref.shadow,
|
|
770
770
|
_ref$size = _ref.size,
|
|
771
771
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
772
|
+
_ref$type = _ref.type,
|
|
773
|
+
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
772
774
|
_ref$variant = _ref.variant,
|
|
773
775
|
variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
|
|
774
776
|
restProps = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
@@ -790,6 +792,8 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
790
792
|
onBlur: handleBlur,
|
|
791
793
|
onFocus: handleFocus,
|
|
792
794
|
ref: ref
|
|
795
|
+
}, !asChild && {
|
|
796
|
+
type: type
|
|
793
797
|
}, restProps), isLoading && React.createElement(Spinner, {
|
|
794
798
|
className: styles$s['spinner-wrapper']
|
|
795
799
|
}), iconPrefix && React.createElement(Icon, {
|
|
@@ -3484,7 +3488,8 @@ var ModalHeader = function ModalHeader(_ref) {
|
|
|
3484
3488
|
variant: "tertiary",
|
|
3485
3489
|
onClick: onDismiss,
|
|
3486
3490
|
iconPrefix: "remove",
|
|
3487
|
-
size: "sm"
|
|
3491
|
+
size: "sm",
|
|
3492
|
+
type: "button"
|
|
3488
3493
|
}));
|
|
3489
3494
|
};
|
|
3490
3495
|
|