UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

26 lines (25 loc) 1.66 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)({ extends: SkeletonShape_1.skeletonSurfaceFillStencil, vars: { width: '', height: '', backgroundColor: '', }, base: { name: "qq6ki", styles: "box-sizing:border-box;border-radius:var(--cnvs-sys-shape-sm, var(--cnvs-sys-shape-x1, 0.25rem));height:var(--height-skeleton-header-5b02f8, var(--cnvs-sys-size-xs, var(--cnvs-sys-space-x6, 1.5rem)));width:var(--width-skeleton-header-5b02f8);margin-block-end:var(--cnvs-sys-size-xxxs, var(--cnvs-sys-space-x4, 1rem));" } }, "skeleton-header-5b02f8"); 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, height: typeof height === 'number' ? (0, canvas_kit_styling_1.px2rem)(height) : height, })) })), });