summaryrefslogtreecommitdiff
path: root/@linaria/packages/core/src/cx.ts
blob: e34fae2d98e1763ab0b92d35879a1570c61de6b0 (plain)
1
2
3
4
5
6
7
8
9
export type ClassName = string | false | void | null | 0;

type CX = (...classNames: ClassName[]) => string;

const cx: CX = function cx() {
  return Array.prototype.slice.call(arguments).filter(Boolean).join(' ');
};

export default cx;