UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

58 lines (57 loc) 1.63 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.background = exports.backgroundFns = exports.backgroundStyleFnConfigs = void 0; const buildStyleFns_1 = require("./buildStyleFns"); exports.backgroundStyleFnConfigs = [ { name: 'background', properties: ['background'], system: 'color', }, { name: 'backgroundAttachment', properties: ['backgroundAttachment'], system: 'none', }, { name: 'backgroundColor', properties: ['backgroundColor'], system: 'color', }, { name: 'backgroundImage', properties: ['backgroundImage'], system: 'none', }, { name: 'backgroundPosition', properties: ['backgroundPosition'], system: 'none', }, { name: 'backgroundRepeat', properties: ['backgroundRepeat'], system: 'none', }, { name: 'backgroundSize', properties: ['backgroundSize'], system: 'none', }, ]; exports.backgroundFns = (0, buildStyleFns_1.buildStyleFns)(exports.backgroundStyleFnConfigs); /** * A style prop function that takes component props and returns border styles. * Some props, such as background and backgroundColor, are connected to our design tokens. * If no `BackgroundStyleProps` are found, it returns an empty object. * * @example * ```tsx * const BackgroundExample = () => ( * <Box backgroundColor="blueberry500"> * Hello, background styles! * </Box> * ); *``` */ exports.background = (0, buildStyleFns_1.buildStylePropFn)(exports.backgroundFns);