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,11 @@
import { FunctionComponent, Ref } from 'preact'
import { JSXInternal } from 'preact/src/jsx'
import { forwardRef } from 'preact/compat'
import { useState } from 'preact/hooks'
import { ChangeEventHandler, Ref, forwardRef, useState } from 'react'
type Props = {
id: string
type: 'text' | 'email' | 'password'
label: string
value: string
onChange: JSXInternal.GenericEventHandler<HTMLInputElement>
onChange: ChangeEventHandler<HTMLInputElement>
disabled?: boolean
className?: string
labelClassName?: string
@@ -16,7 +13,7 @@ type Props = {
isInvalid?: boolean
}
export const FloatingLabelInput: FunctionComponent<Props> = forwardRef(
const FloatingLabelInput = forwardRef(
(
{
id,
@@ -71,3 +68,5 @@ export const FloatingLabelInput: FunctionComponent<Props> = forwardRef(
)
},
)
export default FloatingLabelInput