File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import type { ButtonHTMLAttributes , FC , PropsWithChildren } from 'react'
2+
3+ export const Button : FC < PropsWithChildren < ButtonHTMLAttributes < HTMLButtonElement > > > = ( { children, ...props } ) => (
4+ < button className = "bg-blue-500 text-white px-4 py-2 rounded-md" type = "submit" { ...props } >
5+ { children }
6+ </ button >
7+ )
Original file line number Diff line number Diff line change 11import clsx from 'clsx'
2- import type { FC , HTMLAttributes } from 'react'
2+ import type { FC , InputHTMLAttributes } from 'react'
33
4- export const Input : FC < HTMLAttributes < HTMLInputElement > > = ( { className, ...props } ) => (
4+ export const Input : FC < InputHTMLAttributes < HTMLInputElement > > = ( { className, ...props } ) => (
55 < input className = { clsx ( 'border border-gray-300 rounded-md p-2' , className ) } { ...props } />
66)
Original file line number Diff line number Diff line change 1- import type { FC , HTMLAttributes , PropsWithChildren } from 'react'
1+ import type { FC , LabelHTMLAttributes , PropsWithChildren } from 'react'
22
3- export const Label : FC < PropsWithChildren < HTMLAttributes < HTMLLabelElement > > > = ( { children, ...props } ) => (
3+ export const Label : FC < PropsWithChildren < LabelHTMLAttributes < HTMLLabelElement > > > = ( { children, ...props } ) => (
44 < label className = "text-sm font-medium" { ...props } >
55 { children }
66 </ label >
Original file line number Diff line number Diff line change 11import clsx from 'clsx'
2- import type { FC , HTMLAttributes } from 'react'
2+ import type { FC , TextareaHTMLAttributes } from 'react'
33
4- export const Textarea : FC < HTMLAttributes < HTMLTextAreaElement > > = ( { className, ...props } ) => (
4+ export const Textarea : FC < TextareaHTMLAttributes < HTMLTextAreaElement > > = ( { className, ...props } ) => (
55 < textarea className = { clsx ( 'border border-gray-300 rounded-md p-2' , className ) } { ...props } />
66)
You can’t perform that action at this time.
0 commit comments