refactor: replace 'preact' with 'react' (#1048)

This commit is contained in:
Aman Harwara
2022-05-30 12:42:52 +05:30
committed by GitHub
parent e74b4953ea
commit 8c368dd96b
231 changed files with 4794 additions and 4302 deletions

View File

@@ -1,14 +1,14 @@
import { FunctionComponent } from 'preact'
import { ChangeEventHandler, FunctionComponent } from 'react'
type CheckboxProps = {
name: string
checked: boolean
onChange: (e: Event) => void
onChange: ChangeEventHandler<HTMLInputElement>
disabled?: boolean
label: string
}
export const Checkbox: FunctionComponent<CheckboxProps> = ({ name, checked, onChange, disabled, label }) => {
const Checkbox: FunctionComponent<CheckboxProps> = ({ name, checked, onChange, disabled, label }) => {
return (
<label htmlFor={name} className="flex items-center fit-content mb-2">
<input
@@ -24,3 +24,5 @@ export const Checkbox: FunctionComponent<CheckboxProps> = ({ name, checked, onCh
</label>
)
}
export default Checkbox