Files
Robin Malfait e10f54bc12 Migrate React playground to Tailwind CSS v4 (#3695)
This PR bumps the internal React playground to use Tailwind CSS v4
2025-04-11 19:28:04 +02:00

21 lines
633 B
TypeScript

import { ComponentProps, forwardRef, ReactNode } from 'react'
function classNames(...classes: (string | false | undefined | null)[]) {
return classes.filter(Boolean).join(' ')
}
export let Button = forwardRef<
HTMLButtonElement,
ComponentProps<'button'> & { children?: ReactNode }
>(({ className, ...props }, ref) => (
<button
ref={ref}
type="button"
className={classNames(
'focus:outline-hidden ui-focus-visible:ring-2 ui-focus-visible:ring-offset-2 flex items-center rounded-md border border-gray-300 bg-white px-2 py-1 ring-gray-500 ring-offset-gray-100',
className
)}
{...props}
/>
))