@esds-sangam/utils
v0.1.7
Published
Shared utility helpers for the ESDS Sangam Design System. Currently includes a Tailwind-aware `cn` helper for safe `className` composition.
Readme
@esds-sangam/utils
Shared utility helpers for the ESDS Sangam Design System. Currently includes a Tailwind-aware cn helper for safe className composition.
Install
npm install @esds-sangam/utilsUsage
import { cn } from "@esds-sangam/utils";
export function PrimaryButton({ className, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>) {
return (
<button
className={cn(
"inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium",
"bg-primary-600 text-white hover:bg-primary-700 disabled:bg-neutral-300 disabled:text-neutral-600",
className
)}
{...props}
/>
);
}