名前の変更

dev-frontend-with-api
Haru.Kusano 5 months ago
parent 104132d7fb
commit 9fdcb04598
  1. 28
      frontend/src/components/CategoryDropDown.tsx
  2. 4
      frontend/src/pages/TaskListPage.tsx

@ -0,0 +1,28 @@
import React, { useState } from "react";
import MenuItem from "@mui/material/MenuItem";
import Select from "@mui/material/Select";
import FormControl from "@mui/material/FormControl";
import InputLabel from "@mui/material/InputLabel";
const CategoryDropDown = () => {
const [selectedValue, setSelectedValue] = useState(""); // 選択された値の状態管理
return (
<FormControl sx={{ width: "50%", marginBottom:2 }}>
<InputLabel id="demo-simple-select-label"></InputLabel>
<Select
labelId="demo-simple-select-label"
value={selectedValue}
onChange={(event) => setSelectedValue(event.target.value)}
>
<MenuItem value="乳製品"></MenuItem>
<MenuItem value="肉・魚"></MenuItem>
<MenuItem value="野菜"></MenuItem>
<MenuItem value="調味料">調</MenuItem>
<MenuItem value="その他"></MenuItem>
</Select>
</FormControl>
);
};
export default CategoryDropDown;

@ -34,7 +34,7 @@ import {
import { Task } from '../types/types';
import { TASK_ERRORS } from '../constants/errorMessages';
//import { FaCarrot } from "react-icons/fa6"; //エラー起きる いったん保留
import DropDown from "../components/DropDown";
import CategoryDropDown from "../components/CategoryDropDown";
@ -212,7 +212,7 @@ const TaskListPage: React.FC = () => {
<DialogContent>
<Box sx={{ pt: 1 }}>
{/*材料カテゴリ選択 */}
<DropDown></DropDown>
<CategoryDropDown></CategoryDropDown>
{/* タスクタイトル入力フィールド */}
<TextField
autoFocus

Loading…
Cancel
Save