This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { ClassValue } from "class-variance-authority/types"; | |
| import clsx from "clsx"; | |
| import { twMerge } from "tailwind-merge"; | |
| export function cn(...inputs: ClassValue[]) { | |
| return twMerge(clsx(inputs)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useForm } from "react-hook-form"; | |
| const Validation = () => { | |
| const { | |
| register, | |
| handleSubmit, | |
| formState: { errors, isValid } | |
| } = useForm({ mode: "onBlur" }); | |
| const onSubmit = (data) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useForm } from "react-hook-form"; | |
| const DefaultValue = () => { | |
| const { register, handleSubmit } = useForm({ | |
| defaultValues: { | |
| firstName: "oji", | |
| lastName: "ramadhan" | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .App { | |
| font-family: sans-serif; | |
| color: black; | |
| } | |
| .borderRed { | |
| border: 2px solid crimson; | |
| } | |
| *:focus { |