@eduzz/houston
Advanced tools
Comparing version 0.0.25 to 0.0.26
@@ -13,5 +13,5 @@ import * as React from 'react'; | ||
type: 'primary' | 'secondary' | 'text'; | ||
loading?: boolean; | ||
loading: boolean; | ||
} | ||
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>>>; | ||
export default _default; |
@@ -11,3 +11,3 @@ "use strict"; | ||
var theme = context_1.useTheme(); | ||
var className = props.className, children = props.children, style = props.style, onClick = props.onClick, _a = props.disabled, disabled = _a === void 0 ? false : _a, startIcon = props.startIcon, type = props.type, href = props.href, endIcon = props.endIcon, fullWidth = props.fullWidth, id = props.id, _b = props.loading, loading = _b === void 0 ? false : _b; | ||
var className = props.className, children = props.children, style = props.style, onClick = props.onClick, _a = props.disabled, disabled = _a === void 0 ? false : _a, startIcon = props.startIcon, _b = props.type, type = _b === void 0 ? 'primary' : _b, href = props.href, endIcon = props.endIcon, fullWidth = props.fullWidth, id = props.id, _c = props.loading, loading = _c === void 0 ? false : _c; | ||
var buttonProps = { className: className, style: style, onClick: onClick, disabled: disabled, startIcon: startIcon, href: href, endIcon: endIcon, fullWidth: fullWidth, id: id, loading: loading }; | ||
@@ -20,4 +20,4 @@ var variantMap = { | ||
return (React.createElement(styles_1.ThemeProvider, { theme: theme }, | ||
React.createElement(Button_1.default, tslib_1.__assign({}, buttonProps, { disabled: loading ? true : disabled, startIcon: loading ? React.createElement(CircularProgress_1.default, { size: 18, color: 'inherit' }) : startIcon, variant: variant, color: 'primary', ref: ref }), children))); | ||
React.createElement(Button_1.default, tslib_1.__assign({}, buttonProps, { disabled: disabled || loading, startIcon: loading ? React.createElement(CircularProgress_1.default, { size: 18, color: 'inherit' }) : startIcon, variant: variant, color: 'primary', ref: ref }), children))); | ||
}); | ||
exports.default = React.memo(Button); |
{ | ||
"name": "@eduzz/houston", | ||
"description": "Eduzz Components UI", | ||
"version": "0.0.25", | ||
"version": "0.0.26", | ||
"main": "./index.js", | ||
@@ -6,0 +6,0 @@ "types": "./index.d.ts", |
21530
648