Skip to content

Commit

Permalink
onupdate stuff for the text box
Browse files Browse the repository at this point in the history
  • Loading branch information
denniwang committed Oct 25, 2024
1 parent ecf5d91 commit 118ec62
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/frontend/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@ const SidebarContainer: React.FC<PropsWithChildren<SidebarContainerProps>> = ({
renderDropdownWarning = true,
children,
}) => {
const [notes, setNotes] = useState<string>("");
const handleNewNotes = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
setNotes(e.target.value);
console.log("New notes: ", e.target.value);
};
return (
<Box pt="xl" borderRight="1px" borderRightColor="neutral.200" minH="100%">
<Box px="md" pb="md">
Expand Down Expand Up @@ -404,7 +409,12 @@ const SidebarContainer: React.FC<PropsWithChildren<SidebarContainerProps>> = ({
<Text color="primary.blue.dark.main" fontSize="sm" fontWeight="bold">
Notes
</Text>
<Textarea placeholder="notes here!" resize="vertical" />
<Textarea
placeholder="notes here!"
resize="vertical"
value={notes}
onChange={handleNewNotes}
/>
</VStack>
</Box>
</Box>
Expand Down

0 comments on commit 118ec62

Please sign in to comment.