Skip to content

Instantly share code, notes, and snippets.

@t18n
Last active September 26, 2018 19:03
Show Gist options
  • Save t18n/c8d2463f5a4b74faa6d787ac85a48a47 to your computer and use it in GitHub Desktop.
Save t18n/c8d2463f5a4b74faa6d787ac85a48a47 to your computer and use it in GitHub Desktop.
// Return multiple className which separate by space
// Usage : Really useful when adding multiple classes to className as modules
export function classes(classArray) {
  return classArray.join(' ');
}

const squareBox = <div className={classes([styles['shape'], styles.square ])}>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment