@carbon/react
Version:
React components for the Carbon Design System
38 lines (32 loc) • 1.04 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 React = require('react');
var PropTypes = require('prop-types');
var cx = require('classnames');
var usePrefix = require('../../internal/usePrefix.js');
const SkeletonPlaceholder = ({
className,
...other
}) => {
const prefix = usePrefix.usePrefix();
const skeletonPlaceholderClasses = cx({
[`${prefix}--skeleton__placeholder`]: true
}, className);
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
className: skeletonPlaceholderClasses
}, other));
};
SkeletonPlaceholder.propTypes = {
/**
* Add a custom class to the component to set the height and width
*/
className: PropTypes.string
};
exports.default = SkeletonPlaceholder;