monday-ui-react-core
Version:
Official monday.com UI resources for application development in React.js
3 lines (2 loc) • 1.13 kB
JavaScript
import{defineProperty as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{camelCase as t}from"lodash-es";import{getTestId as s,ComponentDefaultTestId as i}from"../../tests/testIds.js";import r from"classnames";import l from"react";import{SkeletonType as o,SKELETON_SIZES as a,TextSkeletonSize as m,SKELETON_CUSTOM_SIZE as d}from"./SkeletonConstants.js";import{getStyle as p}from"../../helpers/typesciptCssModulesHelper.js";import{withStaticProps as c}from"../../types/withStaticProps.js";import f from"./Skeleton.module.scss.js";var n=c((function(c){var n=c.type,u=void 0===n?o.RECTANGLE:n,h=c.size,v=void 0===h?a.CUSTOM:h,j=c.className,E=c.wrapperClassName,N=c.width,y=c.height,C=c.fullWidth,S=void 0!==C&&C,w=c.id,O=c["data-testid"],T=Object.values(o).includes(u)?u:o.RECTANGLE,b=Object.values(m).includes(v)?v:d;return l.createElement("div",{id:w,className:r(f.skeleton,E,e({},f.fullWidth,S)),"data-testid":O||s(i.SKELETON,w)},l.createElement("div",{className:r(f[T],p(f,t(T+"-"+b)),j,e({},f.fullWidth,S)),style:{width:N,height:y}}))}),{types:o,sizes:a});export{n as default};
//# sourceMappingURL=Skeleton.js.map