@compiled/react
Version:
A familiar and performant compile time CSS-in-JS library for React.
22 lines (21 loc) • 647 B
TypeScript
/**
* Create a single string containing all the classnames provided, separated by a space (`" "`).
* The result will only contain the _last_ atomic style classname for each atomic `group`.
*
* ```ts
* ax(['_aaaaaabbbb', '_aaaaaacccc']);
* // output
* '_aaaaaacccc'
* ```
*
* Format of Atomic style classnames: `_{group}{value}` (`_\w{4}\w{4}`)
*
* `ax` will preserve any non atomic style classnames (eg `"border-red"`)
*
* ```ts
* ax(['_aaaaaabbbb', '_aaaaaacccc', 'border-red']);
* // output
* '_aaaaaacccc border-red'
* ```
*/
export default function ax(classNames: (string | undefined | null | false)[]): string | undefined;