UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

28 lines (27 loc) 1.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SkeletonShape = exports.skeletonShapeStencil = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const common_1 = require("@workday/canvas-kit-react/common"); const canvas_kit_styling_1 = require("@workday/canvas-kit-styling"); const canvas_tokens_web_1 = require("@workday/canvas-tokens-web"); exports.skeletonShapeStencil = (0, canvas_kit_styling_1.createStencil)({ vars: { width: '', height: '', borderRadius: '', backgroundColor: '', }, base: { name: "3ivdb7", styles: "box-sizing:border-box;background-color:var(--backgroundColor-skeleton-shape-5b810e, var(--cnvs-sys-color-bg-alt-strong));border-radius:var(--borderRadius-skeleton-shape-5b810e, var(--cnvs-sys-space-zero));height:var(--height-skeleton-shape-5b810e, 100%);width:var(--width-skeleton-shape-5b810e);margin-bottom:var(--cnvs-sys-space-x4);" } }, "skeleton-shape-5b810e"); exports.SkeletonShape = (0, common_1.createComponent)('div')({ displayName: 'Skeleton.Shape', Component: ({ width = '100%', height, backgroundColor, borderRadius, ...elemProps }, ref, Element) => { return ((0, jsx_runtime_1.jsx)(Element, { ref: ref, ...(0, canvas_kit_styling_1.handleCsProp)(elemProps, (0, exports.skeletonShapeStencil)({ width: typeof width === 'number' ? (0, canvas_kit_styling_1.px2rem)(width) : width, height: typeof height === 'number' ? (0, canvas_kit_styling_1.px2rem)(height) : height, backgroundColor, borderRadius: typeof borderRadius === 'number' ? (0, canvas_kit_styling_1.px2rem)(borderRadius) : borderRadius, })) })); }, });