Skip to content

Commit

Permalink
TaskEditor を作成
Browse files Browse the repository at this point in the history
  • Loading branch information
itizawa committed Dec 17, 2023
1 parent 2878e6c commit 4c5baa9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/app/_components/domains/Task/TaskEditor/TaskEditor.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use client';

import { FC, useCallback } from 'react';
import { Editor } from '~/app/_components/uiParts/Editor';
import { Task } from '~/domains/Task';

type Props = {
task?: Task;
};

export const TaskEditor: FC<Props> = ({ task }) => {
const handleEditorChange = useCallback(async (body: string) => {
console.log(body);
}, []);

return <Editor body={task?.body} onChange={handleEditorChange} placeholder="タスクの内容を記入しましょう" />;
};
1 change: 1 addition & 0 deletions src/app/_components/domains/Task/TaskEditor/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { TaskEditor } from './TaskEditor';

0 comments on commit 4c5baa9

Please sign in to comment.