@coveord/plasma-mantine
Version:
A Plasma flavoured Mantine theme
53 lines (52 loc) • 2.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "PromptConfirmButton", {
enumerable: true,
get: function() {
return PromptConfirmButton;
}
});
var _object_spread = require("@swc/helpers/_/_object_spread");
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
var _jsxruntime = require("react/jsx-runtime");
var _core = require("@mantine/core");
var _Button = require("../button/Button");
var _Promptcontext = require("./Prompt.context");
var COLOR_BY_VARIANT = {
success: 'action',
info: 'action',
warning: 'critical',
critical: 'critical'
};
var defaultProps = {};
var PromptConfirmButton = (0, _core.factory)(function(_props, ref) {
var _usePromptContext = (0, _Promptcontext.usePromptContext)(), variant = _usePromptContext.variant, getStyles = _usePromptContext.getStyles;
var props = (0, _core.useProps)('PromptConfirmButton', defaultProps, _props);
var className = props.className, classNames = props.classNames, style = props.style, styles = props.styles, unstyled = props.unstyled, vars = props.vars, disabled = props.disabled, disabledTooltip = props.disabledTooltip, disabledTooltipProps = props.disabledTooltipProps, others = _object_without_properties._(props, [
"className",
"classNames",
"style",
"styles",
"unstyled",
"vars",
"disabled",
"disabledTooltip",
"disabledTooltipProps"
]);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Button.Button, _object_spread._({
ref: ref,
variant: "filled",
color: COLOR_BY_VARIANT[variant],
disabled: disabled,
disabledTooltip: disabledTooltip,
disabledTooltipProps: disabledTooltipProps
}, others, getStyles('confirm', {
style: style,
styles: styles,
className: className,
classNames: classNames
})));
});
//# sourceMappingURL=PromptConfirmButton.js.map