classnamed-components
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.3 • Public • Published

    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

    Keywords

    none

    Install

    npm i classnamed-components

    DownloadsWeekly Downloads

    6

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    35.3 kB

    Total Files

    9

    Last publish

    Collaborators

    • hermanya