import type * as CSS from 'csstype'; import type { ResponsiveValue } from './responsiveValue'; import { Config, system } from 'styled-system'; const config: Config = { w: { property: 'width', scale: 'sizes', }, h: { property: 'height', scale: 'sizes', }, boxSize: { properties: ['width', 'height'], scale: 'sizes', }, minW: { property: 'minWidth', scale: 'sizes', }, minH: { property: 'minHeight', scale: 'sizes', }, maxW: { property: 'maxWidth', scale: 'sizes', }, maxH: { property: 'maxHeight', scale: 'sizes', }, d: { property: 'display', }, boxSizing: true, }; /** * Types for layout related CSS properties */ export interface customLayoutProps { /** * The CSS `display` property */ d?: ResponsiveValue; /** * The CSS `width` property */ w?: ResponsiveValue>; /** * The CSS `width` and `height` property */ boxSize?: ResponsiveValue>; /** * The CSS `max-width` property */ maxW?: ResponsiveValue>; /** * The CSS `min-width` property */ minW?: ResponsiveValue>; /** * The CSS `height` property */ h?: ResponsiveValue>; /** * The CSS `max-height` property */ maxH?: ResponsiveValue>; /** * The CSS `min-height` property */ minH?: ResponsiveValue>; /** * The CSS `box-sizing` property */ boxSizing?: ResponsiveValue; } export const customLayout = system(config);