mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-15 11:51:39 +00:00
* Update next to canary * Update layout.tsx * Use canary * Remove serverActions flag warning * Use unstable_noStore * Add Date.now() test * Update metadataBase url * Create wrapper component for Cards * Update page.tsx * Misc * Delete unused data fetch * Add noStore to /invoices and /customers functions * Remove date.now() * Use canary * Rename component * Fix imports * Update types for useFormStatus and useFormState * Rename folder, add team members * fixed images and added login button pending state * Update dashboard/final-example/app/lib/data.ts Co-authored-by: Matt Kane <m@mk.gg> --------- Co-authored-by: Steven Tey <stevensteel97@gmail.com> Co-authored-by: Matt Kane <m@mk.gg>
20 lines
656 B
TypeScript
20 lines
656 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 active:bg-blue-600 aria-disabled:cursor-not-allowed aria-disabled:opacity-50',
|
|
className,
|
|
)}
|
|
>
|
|
{children}
|
|
</button>
|
|
);
|
|
}
|