@fluentui/react-northstar
Version:
A themable React component library.
47 lines (44 loc) • 2.44 kB
JavaScript
exports.__esModule = true;
exports.skeletonShapeClassName = exports.SkeletonShape = void 0;
var PropTypes = _interopRequireWildcard(require("prop-types"));
var _reactBindings = require("@fluentui/react-bindings");
var _utils = require("../../utils");
var _Box = require("../Box/Box");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var skeletonShapeClassName = 'ui-skeleton__shape';
/**
* A SkeletonShape represents a shape (Image/Button/etc...) that will be loaded
*/
exports.skeletonShapeClassName = skeletonShapeClassName;
var SkeletonShape = (0, _reactBindings.compose)(_Box.Box, {
className: skeletonShapeClassName,
displayName: 'SkeletonShape',
overrideStyles: true,
shorthandConfig: {},
handledProps: ['round', 'width', 'height'],
mapPropsToStylesProps: function mapPropsToStylesProps(_ref) {
var width = _ref.width,
height = _ref.height,
round = _ref.round;
return {
width: width,
height: height,
round: round
};
}
});
exports.SkeletonShape = SkeletonShape;
SkeletonShape.propTypes = Object.assign({}, _utils.commonPropTypes.createCommon(), {
width: PropTypes.string,
height: PropTypes.string,
round: PropTypes.bool
});
SkeletonShape.defaultProps = {
as: 'span',
width: '100px',
height: '100px',
round: false
};
//# sourceMappingURL=SkeletonShape.js.map
;