Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 496 Bytes

README.md

File metadata and controls

21 lines (15 loc) · 496 Bytes

@evanwinter/cn

Utility function for merging Tailwind class names as popularized by @shadcn/ui; all credit to them. Publishing to NPM for my convenience.

Installation

npm i @evanwinter/cn

Usage

import { cn } from '@evanwinter/cn';

export function Button({ className, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>) {
  return (
    <button {...props} className={cn("bg-black text-white rounded", props.className)}>
  )
}