@roo-ui/components
Version:
100 lines (97 loc) • 1.54 kB
JavaScript
import isPropValid from '@emotion/is-prop-valid';
export const KNOWN_STYLED_SYSTEM_PROPS = [
'm',
'margin',
'mt',
'marginTop',
'mr',
'marginRight',
'mb',
'marginBottom',
'ml',
'marginLeft',
'mx',
'my',
'p',
'padding',
'pt',
'paddingTop',
'pr',
'paddingRight',
'pb',
'paddingBottom',
'pl',
'paddingLeft',
'px',
'py',
'width',
'fontSize',
'color',
'bg',
'backgroundColor',
'fontFamily',
'textAlign',
'lineHeight',
'fontWeight',
'fontStyle',
'letterSpacing',
'display',
'maxWidth',
'minWidth',
'height',
'maxHeight',
'minHeight',
'size',
'verticalAlign',
'alignItems',
'justifyContent',
'flexWrap',
'flexDirection',
'flex',
'alignContent',
'justifyItems',
'justifySelf',
'alignSelf',
'order',
'flexBasis',
'gridGap',
'gridRowGap',
'gridColumnGap',
'gridColumn',
'gridRow',
'gridArea',
'gridAutoFlow',
'gridAutoRows',
'gridAutoColumns',
'gridTemplateRows',
'gridTemplateColumns',
'gridTemplateAreas',
'background',
'backgroundImage',
'backgroundSize',
'backgroundPosition',
'backgroundRepeat',
'border',
'borderTop',
'borderRight',
'borderBottom',
'borderLeft',
'borderWidth',
'borderStyle',
'borderColor',
'borderRadius',
'boxShadow',
'opacity',
'overflow',
'position',
'zIndex',
'top',
'right',
'bottom',
'left',
'textStyle',
'colors',
'variant',
];
export const VALID_STYLED_SYSTEM_PROPS =
KNOWN_STYLED_SYSTEM_PROPS.filter(name => isPropValid(name));