1.0.2 • Published 6 years ago

react-classname-elements v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

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}))