1.0.1 • Published 1 year ago

react-styled-class v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-styled-class

Just INLINE styles.

import { useStyled } from 'react-styled-class'

export const StyledButton = ({ primary }) => {
  const styled = useStyled()
  return (
    <button
      className={styled(`
        color: gray;
        &:hover {
          color: orange;
        }
      `)}
    >
      Button
    </button>
  )
}

Or you can use style objects.

styled({
  color: 'gray'
})

Equivalent to:

styled(`
  color: gray;
`)

WHY

I'm tired of naming CSS classes (and creating styled components :D).

1.0.1

1 year ago

1.0.0

1 year ago