Skip to content

Commit

Permalink
update vite and clean up form1
Browse files Browse the repository at this point in the history
  • Loading branch information
maangs committed Dec 3, 2023
1 parent 34e2e2e commit 45f46da
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
5 changes: 3 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "rhf-devtools-example",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
Expand All @@ -16,8 +17,8 @@
"devDependencies": {
"@types/react": "^17.0.4",
"@types/react-dom": "^17.0.3",
"@vitejs/plugin-react": "^2.0.0",
"@vitejs/plugin-react": "^4.2.0",
"typescript": "^4.2.4",
"vite": "^3.0.5"
"vite": "^5.0.4"
}
}
1 change: 0 additions & 1 deletion example/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ nav {
nav > a {
appearance: none;
text-decoration: inherit;
text-transform: uppercase;
color: white;
border: 1px solid white;
border-radius: 4px;
Expand Down
14 changes: 8 additions & 6 deletions example/src/forms/Form1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ const Form1: React.FC<{ placement: PLACEMENT }> = ({ placement }) => {
return (
<>
<form onSubmit={handleSubmit((data) => data)}>
<label>First Name</label>
<input {...register('firstName', { required: true })} />
<input {...register('ha.test', { required: true })} />

<label>Last Name</label>
<input {...register('lastName', { required: true })} />
<label>
First Name
<input {...register('firstName', { required: true })} />
</label>

<label>
Last Name
<input {...register('lastName', { required: true })} />
</label>
<input style={{ fontWeight: 400 }} type="submit" />
</form>

Expand Down

0 comments on commit 45f46da

Please sign in to comment.