diff --git a/app/dashboard/puzzles/page.tsx b/app/dashboard/puzzles/page.tsx index b09e966..54c053f 100644 --- a/app/dashboard/puzzles/page.tsx +++ b/app/dashboard/puzzles/page.tsx @@ -1,7 +1,9 @@ +import Button from '@/ui/Button'; import Input from '@/ui/Input'; import ToHTML from '@/ui/ToHTML'; export default function Page() { + // on va utiliser react-hook-form https://react-hook-form.com/ return (
@@ -11,10 +13,27 @@ export default function Page() {
-
- - -
+
+
+ + +
+ +
); } diff --git a/ui/Button.tsx b/ui/Button.tsx new file mode 100644 index 0000000..86f62e3 --- /dev/null +++ b/ui/Button.tsx @@ -0,0 +1,26 @@ +import { cn } from '@/lib/utils'; +import { forwardRef } from 'react'; + +const Button = forwardRef< + HTMLButtonElement, + React.ButtonHTMLAttributes & { + kind?: 'default' | 'outline' | 'danger'; + } +>(({ kind = 'default', className, ...props }, ref) => ( +