@hixme-ui/button
Advanced tools
Comparing version 1.16.0 to 1.16.5
@@ -43,5 +43,7 @@ 'use strict'; | ||
split = _ref.split, | ||
loading = _ref.loading, | ||
loadingText = _ref.loadingText, | ||
submitting = _ref.submitting, | ||
submittingText = _ref.submittingText, | ||
props = (0, _objectWithoutProperties3.default)(_ref, ['children', 'disabled', 'menu', 'outline', 'split', 'submitting', 'submittingText']); | ||
props = (0, _objectWithoutProperties3.default)(_ref, ['children', 'disabled', 'menu', 'outline', 'split', 'loading', 'loadingText', 'submitting', 'submittingText']); | ||
@@ -52,5 +54,5 @@ if (outline) { | ||
(0, _extends3.default)({}, props, { | ||
disabled: submitting || disabled | ||
disabled: loading || submitting || disabled | ||
}), | ||
submitting ? submittingText : children | ||
loading || submitting ? loadingText || submittingText : children | ||
); | ||
@@ -65,5 +67,5 @@ } | ||
}, props, { | ||
disabled: submitting || disabled | ||
disabled: loading || submitting || disabled | ||
}), | ||
submitting ? submittingText : children | ||
loading || submitting ? loadingText || submittingText : children | ||
); | ||
@@ -75,5 +77,5 @@ } | ||
(0, _extends3.default)({}, props, { | ||
disabled: submitting || disabled | ||
disabled: loading || submitting || disabled | ||
}), | ||
submitting ? submittingText : children | ||
loading || submitting ? loadingText || submittingText : children | ||
); | ||
@@ -92,3 +94,5 @@ }; | ||
submitting: _propTypes2.default.bool, | ||
submittingText: _propTypes2.default.string | ||
submittingText: _propTypes2.default.string, | ||
loading: _propTypes2.default.bool, | ||
loadingText: _propTypes2.default.string | ||
}; | ||
@@ -103,3 +107,5 @@ | ||
submitting: false, | ||
submittingText: 'Submitting...' | ||
submittingText: 'Submitting...', | ||
loading: false, | ||
loadingText: 'Submitting...' | ||
}; | ||
@@ -106,0 +112,0 @@ |
{ | ||
"name": "@hixme-ui/button", | ||
"version": "1.16.0", | ||
"version": "1.16.5", | ||
"description": "hixme-ui Button component", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -36,2 +36,3 @@ # hixme-ui button | ||
| menu | boolean | false | | ||
| loading | boolean | false | | ||
@@ -38,0 +39,0 @@ |
@@ -14,2 +14,4 @@ import React from 'react' | ||
split, | ||
loading, | ||
loadingText, | ||
submitting, | ||
@@ -23,5 +25,5 @@ submittingText, | ||
{...props} | ||
disabled={submitting || disabled} | ||
disabled={loading || submitting || disabled} | ||
> | ||
{submitting ? submittingText : children} | ||
{(loading || submitting) ? (loadingText || submittingText) : children} | ||
</OutlineButton> | ||
@@ -36,5 +38,5 @@ ) | ||
{...props} | ||
disabled={submitting || disabled} | ||
disabled={loading || submitting || disabled} | ||
> | ||
{submitting ? submittingText : children} | ||
{(loading || submitting) ? (loadingText || submittingText) : children} | ||
</MenuButton> | ||
@@ -47,5 +49,5 @@ ) | ||
{...props} | ||
disabled={submitting || disabled} | ||
disabled={loading || submitting || disabled} | ||
> | ||
{submitting ? submittingText : children} | ||
{(loading || submitting) ? (loadingText || submittingText) : children} | ||
</GradientButton> | ||
@@ -66,2 +68,4 @@ ) | ||
submittingText: PropTypes.string, | ||
loading: PropTypes.bool, | ||
loadingText: PropTypes.string, | ||
} | ||
@@ -77,4 +81,6 @@ | ||
submittingText: 'Submitting...', | ||
loading: false, | ||
loadingText: 'Submitting...', | ||
} | ||
export default Button |
Sorry, the diff of this file is not supported yet
40459
573
64