mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-26 14:16:13 +00:00
* Use string literals * Use 666 for evil rabbit * Delete extra logo * Use consistent pixels for images * Update button.tsx * Fix 666 mistake
20 lines
579 B
TypeScript
20 lines
579 B
TypeScript
import clsx from 'clsx';
|
|
|
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export function Button({ children, className, ...rest }: ButtonProps) {
|
|
return (
|
|
<button
|
|
{...rest}
|
|
className={clsx(
|
|
'flex h-10 items-center rounded-lg bg-blue-500 px-4 text-sm font-medium text-white transition-colors hover:bg-blue-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500',
|
|
className,
|
|
)}
|
|
>
|
|
{children}
|
|
</button>
|
|
);
|
|
}
|