UNPKG

@carbon/react

Version:

React components for the Carbon Design System

52 lines (48 loc) 2.01 kB
/** * 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. */ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js'; import PropTypes from 'prop-types'; import React from 'react'; import cx from 'classnames'; import { usePrefix } from '../../internal/usePrefix.js'; import { CircleDash } from '@carbon/icons-react'; var _CircleDash, _Step, _Step2, _Step3, _Step4; function Step() { const prefix = usePrefix(); return /*#__PURE__*/React.createElement("li", { className: `${prefix}--progress-step ${prefix}--progress-step--incomplete` }, /*#__PURE__*/React.createElement("div", { className: `${prefix}--progress-step-button ${prefix}--progress-step-button--unclickable` }, _CircleDash || (_CircleDash = /*#__PURE__*/React.createElement(CircleDash, null)), /*#__PURE__*/React.createElement("p", { className: `${prefix}--progress-label` }), /*#__PURE__*/React.createElement("span", { className: `${prefix}--progress-line` }))); } function ProgressIndicatorSkeleton({ className, vertical, ...rest }) { const prefix = usePrefix(); return /*#__PURE__*/React.createElement("ul", _extends({ className: cx(`${prefix}--progress`, `${prefix}--skeleton`, { [`${prefix}--progress--vertical`]: vertical }, className) }, rest), _Step || (_Step = /*#__PURE__*/React.createElement(Step, null)), _Step2 || (_Step2 = /*#__PURE__*/React.createElement(Step, null)), _Step3 || (_Step3 = /*#__PURE__*/React.createElement(Step, null)), _Step4 || (_Step4 = /*#__PURE__*/React.createElement(Step, null))); } ProgressIndicatorSkeleton.propTypes = { /** * Specify an optional className to add. */ className: PropTypes.string, /** * Determines whether or not the ProgressIndicator should be rendered vertically. */ vertical: PropTypes.bool }; export { ProgressIndicatorSkeleton, ProgressIndicatorSkeleton as default };