react-classname-elements

1.0.2 • Public • Published

React classname elements

This package was created to support the nicer creation of components with premade css-classes, for example when using tailwindcss. It explicitly does not support template literals as styled-components does.

The arguments are parsed by the classnames package function.

Basic example:

const tw = require('react-classname-elements'); // Named after tailwind
const Container = tw.div("container flex rounded bg-grey-light", props => ({"bg-orange" : props.isHighlighted}))

Readme

Keywords

none

Package Sidebar

Install

npm i react-classname-elements

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

9.03 kB

Total Files

6

Last publish

Collaborators

  • bstrehl