UNPKG

@carbon/react

Version:

React components for the Carbon Design System

55 lines (49 loc) 1.48 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. */ 'use strict'; 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'); var SkeletonText = require('../SkeletonText/SkeletonText.js'); const AISkeletonText = ({ className, ...rest }) => { const prefix = usePrefix.usePrefix(); const aiSkeletonTextClasses = cx(className, { [`${prefix}--skeleton__text--ai`]: true }); return /*#__PURE__*/React.createElement(SkeletonText.default, _rollupPluginBabelHelpers.extends({ className: aiSkeletonTextClasses }, rest)); }; AISkeletonText.propTypes = { /** * Specify an optional className to be applied to the container node */ className: PropTypes.string, /** * generates skeleton text at a larger size */ heading: PropTypes.bool, /** * the number of lines shown if paragraph is true */ lineCount: PropTypes.number, /** * will generate multiple lines of text */ paragraph: PropTypes.bool, /** * width (in px or %) of single line of text or max-width of paragraph lines */ width: PropTypes.string }; exports.default = AISkeletonText;