forked from aws-samples/amplify-next-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #203 from cabcookie:agile-todo-list
Todoliste nachträglich ändern
- Loading branch information
Showing
7 changed files
with
113 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { JSONContent } from "@tiptap/core"; | ||
import { FC } from "react"; | ||
import { getTextFromJsonContent } from "../ui-elements/editors/helpers/text-generation"; | ||
import { Button } from "../ui/button"; | ||
import { Checkbox } from "../ui/checkbox"; | ||
|
||
type PostPonedTodoProps = { | ||
done: boolean; | ||
content?: JSONContent[] | undefined; | ||
postponeTodo: () => void; | ||
}; | ||
|
||
const PostPonedTodo: FC<PostPonedTodoProps> = ({ | ||
done, | ||
content, | ||
postponeTodo, | ||
}) => ( | ||
<> | ||
<div className="flex flex-row gap-1 items-start mt-4"> | ||
<div className="w-6 min-w-6"> | ||
<Checkbox | ||
checked={done} | ||
onCheckedChange={() => {}} | ||
className="border-gray-300" | ||
/> | ||
</div> | ||
<div className="flex-1"> | ||
<div className="line-through"> | ||
{getTextFromJsonContent({ type: "doc", content })} | ||
</div> | ||
{!done && ( | ||
<Button | ||
variant="outline" | ||
size="sm" | ||
onClick={() => postponeTodo()} | ||
className="mt-2" | ||
> | ||
Handle today | ||
</Button> | ||
)} | ||
</div> | ||
</div> | ||
</> | ||
); | ||
|
||
export default PostPonedTodo; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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