mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-22 12:15:46 +00:00
* Duplicate starter
* Remove code for chapter 16
* Add code for chapter 15
* first 3 chapters
* Remove routes and actions
* chapter 3
* Chapters 12-13
* chapter 5
* Revert "Chapters 12-13"
This reverts commit b6da764d85.
* re-add Link to page
* chapter 5
* chapter 6
* Chapter 11 and 12
* chapter 7
* Revert
* Chapter 11
* Remove PPR flag
* chapter 8
* Chapter 9
* switch from pnpm to npm
* 💅
* Create pnpm-lock.yaml
* build errors
* Fix
* Fix
* Update next
* Update nextauth
---------
Co-authored-by: StephDietz <steph.dietz@vercel.com>
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>
|
|
);
|
|
}
|