Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
feat: Create form for using in menu page
Browse files Browse the repository at this point in the history
  • Loading branch information
re-taro committed Dec 13, 2022
1 parent 294c5e2 commit 49d3071
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/components/form/menu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { UseFormRegister } from "react-hook-form";
import type { FC, FormEventHandler } from "react";
import { Input } from "../shared/form/input";
import type { CreateStoreMenuListItem } from "../../libs/firebase/store";

type MenuFormProps = {
register: UseFormRegister<CreateStoreMenuListItem>;
handleSubmit: FormEventHandler<HTMLFormElement>;
};

export const MenuForm: FC<MenuFormProps> = ({ register, handleSubmit }) => (
<form onSubmit={handleSubmit} id="menu">
<Input {...register("name")} label="相手の名前" size="lg" placeholder="ありばむ太郎" />
<Input {...register("date")} label="記念日" size="lg" placeholder="○月○日" />
<Input {...register("title")} label="タイトル" size="lg" placeholder="" />
</form>
);

0 comments on commit 49d3071

Please sign in to comment.