@carbon/react
Version:
React components for the Carbon Design System
47 lines (41 loc) • 1.39 kB
JavaScript
/**
* 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.
*/
;
Object.defineProperty(exports, '__esModule', { value: true });
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
var PropTypes = require('prop-types');
var React = require('react');
var cx = require('classnames');
var usePrefix = require('../../internal/usePrefix.js');
const SelectSkeleton = ({
hideLabel,
className,
...rest
}) => {
const prefix = usePrefix.usePrefix();
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
className: cx(`${prefix}--form-item`, className)
}, rest), !hideLabel && /*#__PURE__*/React.createElement("span", {
className: `${prefix}--label ${prefix}--skeleton`
}), /*#__PURE__*/React.createElement("div", {
className: `${prefix}--select ${prefix}--skeleton`
}, /*#__PURE__*/React.createElement("div", {
className: `${prefix}--select-input`
})));
};
SelectSkeleton.propTypes = {
/**
* Specify an optional className to add to the form item wrapper.
*/
className: PropTypes.string,
/**
* Specify whether the label should be hidden, or not
*/
hideLabel: PropTypes.bool
};
exports.SelectSkeleton = SelectSkeleton;
exports.default = SelectSkeleton;