UNPKG

@carbon/react

Version:

React components for the Carbon Design System

54 lines (52 loc) 1.79 kB
/** * Copyright IBM Corp. 2016, 2026 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import { usePrefix } from "../../internal/usePrefix.js"; import classNames from "classnames"; import "react"; import PropTypes from "prop-types"; import { jsx, jsxs } from "react/jsx-runtime"; import { CircleDash } from "@carbon/icons-react"; //#region src/components/ProgressIndicator/ProgressIndicator.Skeleton.tsx /** * Copyright IBM Corp. 2016, 2023 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ function Step() { const prefix = usePrefix(); return /* @__PURE__ */ jsx("li", { className: `${prefix}--progress-step ${prefix}--progress-step--incomplete`, children: /* @__PURE__ */ jsxs("div", { className: `${prefix}--progress-step-button ${prefix}--progress-step-button--unclickable`, children: [ /* @__PURE__ */ jsx(CircleDash, {}), /* @__PURE__ */ jsx("p", { className: `${prefix}--progress-label` }), /* @__PURE__ */ jsx("span", { className: `${prefix}--progress-line` }) ] }) }); } function ProgressIndicatorSkeleton({ className, vertical, ...rest }) { const prefix = usePrefix(); return /* @__PURE__ */ jsxs("ul", { className: classNames(`${prefix}--progress`, `${prefix}--skeleton`, { [`${prefix}--progress--vertical`]: vertical }, className), ...rest, children: [ /* @__PURE__ */ jsx(Step, {}), /* @__PURE__ */ jsx(Step, {}), /* @__PURE__ */ jsx(Step, {}), /* @__PURE__ */ jsx(Step, {}) ] }); } ProgressIndicatorSkeleton.propTypes = { className: PropTypes.string, vertical: PropTypes.bool }; //#endregion export { ProgressIndicatorSkeleton as default };