Patch Changes
-
935ec86: Allow passing arrays of
SystemStyleObject
to thecss(xxx, [aaa, bbb, ccc], yyy)
fnThis is useful when you are creating your own styled component and want to benefit
from the recentcss
array property support.import { css } from 'styled-system/css' import type { HTMLStyledProps } from 'styled-system/types' type ButtonProps = HTMLStyledProps<'button'> export const Button = ({ css: cssProp = {}, children }: ButtonProps) => { - const className = css(...(Array.isArray(cssProp) ? cssProp : [cssProp])) + const className = css(cssProp) return <button className={className}>{children}</button> }