react-classy-component

A library to make it more convenient to create components using Tailwind CSS.

Usage no npm install needed!

<script type="module">
  import reactClassyComponent from 'https://cdn.skypack.dev/react-classy-component';
</script>

README

react-classy-component

A library to make it more convenient to create components using Tailwind CSS.

Install

yarn add react-classy-component

Use

// Button.tsx
import { rcc } from "react-classy-component";

export const Button = rcc.button`bg-blue-500 text-white`;

// Somewhere else in your app
import { Button } from "./Button";

const Component = () => (
  <div>
    <Button>Click me!</Button>
  </div>
)