npm

@jdthornton/classnames
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@jdthornton/classnames

npm (scoped) npm bundle size (minified)

Class string joining made easy.

Install

$ npm install @jdthornton/classnames

Usage

import classNames from "@jdthornton/classnames";

function makeClass({ className, primary }){
  return classNames("container", primary && "primary", className)
}

console.log(makeClass({className: "card", primary: true}))

//=> "container primary card"

Readme

Keywords

none

Package Sidebar

Install

npm i @jdthornton/classnames

Weekly Downloads

12

Version

1.0.1

License

MIT

Unpacked Size

3.08 kB

Total Files

5

Last publish

Collaborators

  • jdthornton