@chayns-components/core
Version:
A set of beautiful React components for developing your own applications with chayns.
43 lines • 1.73 kB
JavaScript
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
import React, { forwardRef } from 'react';
import { BaseSkeleton } from '../../base-skeleton/BaseSkeleton';
const BaseHeadlineSkeleton = /*#__PURE__*/forwardRef(({
className,
baseColor,
highlightColor,
style,
borderRadius,
animationType,
width = '60%',
type
}, ref) => /*#__PURE__*/React.createElement(BaseSkeleton, {
as: type,
ref: ref,
width: width,
height: 0,
borderRadius: borderRadius,
animationType: animationType,
baseColor: baseColor,
className: className,
style: style,
highlightColor: highlightColor
}, "Pseudo Headline"));
BaseHeadlineSkeleton.displayName = 'BaseHeadlineSkeleton';
const createHeadlineSkeleton = (type, displayName) => {
const Component = /*#__PURE__*/forwardRef((props, ref) =>
/*#__PURE__*/
// eslint-disable-next-line react/jsx-props-no-spreading
React.createElement(BaseHeadlineSkeleton, _extends({
ref: ref,
type: type
}, props)));
Component.displayName = displayName;
return Component;
};
export const H1Skeleton = createHeadlineSkeleton('h1', 'Skeleton.H1');
export const H2Skeleton = createHeadlineSkeleton('h2', 'Skeleton.H2');
export const H3Skeleton = createHeadlineSkeleton('h3', 'Skeleton.H3');
export const H4Skeleton = createHeadlineSkeleton('h4', 'Skeleton.H4');
export const H5Skeleton = createHeadlineSkeleton('h5', 'Skeleton.H5');
export const H6Skeleton = createHeadlineSkeleton('h6', 'Skeleton.H6');
//# sourceMappingURL=HeadlineSkeleton.js.map