1.0.3 • Published 5 years ago

classnamed-components v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

classnamed-components

Make react components with functional CSS

NPM JavaScript Style Guide

Install

npm install classnamed-components

Usage

import * as React from 'react'
import { classnamed } from 'classnamed-components'

const MyButton = classnamed('button')`
  btn shadow
  ${props => ({
    big: 'btn-lg',
    small: 'btn-sm',
  }[props.size])}
`
const MySection = classNamed("section")`px-6 py-4 bg-white`;

const MyExample = (props) => (
  <MySection/>
    <MyButton size="big" />
    <MyButton size="small" className="ml-2" />
  <MySection/>
)

License

MIT © Hermanya

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago