@gravity-ui/uikit
Version:
Gravity UI base styling and components
18 lines (17 loc) • 1.23 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Progress = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const React = tslib_1.__importStar(require("react"));
const ProgressWithStack_1 = require("./ProgressWithStack.js");
const ProgressWithValue_1 = require("./ProgressWithValue.js");
const constants_1 = require("./constants.js");
const types_1 = require("./types.js");
require("./Progress.css");
exports.Progress = React.forwardRef(function Progress(props, ref) {
const { text = '', theme = 'default', size = 'm', loading = false, className, qa } = props;
const resolvedProps = { ...props, text, theme, size, loading };
return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, className: (0, constants_1.progressBlock)({ size }, className), "data-qa": qa, children: [(0, jsx_runtime_1.jsx)("div", { className: (0, constants_1.progressBlock)('text'), children: text }), (0, types_1.isProgressWithStack)(resolvedProps) ? ((0, jsx_runtime_1.jsx)(ProgressWithStack_1.ProgressWithStack, { ...resolvedProps })) : ((0, jsx_runtime_1.jsx)(ProgressWithValue_1.ProgressWithValue, { ...resolvedProps }))] }));
});
//# sourceMappingURL=Progress.js.map
;