UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

25 lines (24 loc) 1.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SkeletonHeader = exports.skeletonHeaderStencil = 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"); const SkeletonShape_1 = require("./SkeletonShape"); exports.skeletonHeaderStencil = (0, canvas_kit_styling_1.createStencil)({ vars: { width: '', height: '', backgroundColor: '', }, base: { name: "14oy62", styles: "box-sizing:border-box;background-color:var(--backgroundColor-skeleton-header-7a0ddd, var(--cnvs-sys-color-bg-alt-strong));border-radius:0;height:var(--height-skeleton-header-7a0ddd, calc(var(--cnvs-sys-space-x1) * 7));width:var(--width-skeleton-header-7a0ddd);margin-bottom:var(--cnvs-sys-space-x4);" } }, "skeleton-header-7a0ddd"); exports.SkeletonHeader = (0, common_1.createComponent)('div')({ displayName: 'Skeleton.Header', Component: ({ width = '100%', backgroundColor, height, ...elemProps }, ref, Element) => ((0, jsx_runtime_1.jsx)(SkeletonShape_1.SkeletonShape, { ref: ref, as: Element, ...(0, canvas_kit_styling_1.handleCsProp)(elemProps, (0, exports.skeletonHeaderStencil)({ width: typeof width === 'number' ? (0, canvas_kit_styling_1.px2rem)(width) : width, backgroundColor: backgroundColor, height: typeof height === 'number' ? (0, canvas_kit_styling_1.px2rem)(height) : height, })) })), });