next.js/packages/next/src/next-devtools/dev-overlay/utils/cx.ts
cx.ts10 lines327 B
/**
 * Merge multiple args to a single string with spaces. Useful for merging class names.
 * @example
 * cx('foo', 'bar') // 'foo bar'
 * cx('foo', null, 'bar', undefined, 'baz', false) // 'foo bar baz'
 */
export function cx(...args: (string | undefined | null | false)[]): string {
  return args.filter(Boolean).join(' ')
}
Quest for Codev2.0.0
/
SIGN IN