@gravity-ui/uikit
Version:
Gravity UI base styling and components
14 lines (13 loc) • 935 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import * as React from 'react';
import { ProgressWithStack } from "./ProgressWithStack.js";
import { ProgressWithValue } from "./ProgressWithValue.js";
import { progressBlock } from "./constants.js";
import { isProgressWithStack } from "./types.js";
import "./Progress.css";
export const 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 (_jsxs("div", { ref: ref, className: progressBlock({ size }, className), "data-qa": qa, children: [_jsx("div", { className: progressBlock('text'), children: text }), isProgressWithStack(resolvedProps) ? (_jsx(ProgressWithStack, { ...resolvedProps })) : (_jsx(ProgressWithValue, { ...resolvedProps }))] }));
});
//# sourceMappingURL=Progress.js.map