Skip to content

Add text component to the whiteboard#26

Merged
xhulia028 merged 2 commits intofeature_branchfrom
22-implement-text-component
May 29, 2025
Merged

Add text component to the whiteboard#26
xhulia028 merged 2 commits intofeature_branchfrom
22-implement-text-component

Conversation

@ArmanpreetGhotra
Copy link
Copy Markdown
Collaborator

I implemented text component to the whiteboard. Left side of the whiteboard there is a floating sidebar. As soon as user click on text component, user can add text, can change the color of the text, change style of the text.
Screenshot 2025-05-25 at 12 27 31
Screenshot 2025-05-25 at 12 27 53

@ArmanpreetGhotra ArmanpreetGhotra self-assigned this May 25, 2025
@ArmanpreetGhotra ArmanpreetGhotra marked this pull request as ready for review May 25, 2025 10:32
@ArmanpreetGhotra ArmanpreetGhotra changed the base branch from main to feature_branch May 25, 2025 17:33
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ui folder in components is meant for the primitives, for e.g what we install from shadecn. You can move this file one level higher to /components instead.

@xhulia028 xhulia028 requested a review from leon-liang May 25, 2025 18:42
@ArmanpreetGhotra
Copy link
Copy Markdown
Collaborator Author

@xhulia028 @leon-liang I also changed name of the website. Instead of 'create next app', now when you start localhost it will show 'AI-Powered Whiteboard.'

Copy link
Copy Markdown
Collaborator

@leon-liang leon-liang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

variant="ghost"
size="sm"
onClick={() => setIsBold(!isBold)}
className={`h-7 w-7 p-1 ${isBold ? 'bg-slate-200' : ''}`}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use the helper function cn here to avoid template strings here. Makes it slightly easier to read

<input
type="color"
onChange={(e) => handleColorChange(e.target.value)}
value={style.color || '#000000'}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please add this the tailwind.config file?

}, [nodes, setNodes]);

return (
<div style={{ width: "100vw", height: "100vh" }}>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tailwind equivalent would be w-screen and h-screen

@xhulia028 xhulia028 merged commit cd6d62c into feature_branch May 29, 2025
0 of 2 checks passed
@xhulia028 xhulia028 deleted the 22-implement-text-component branch May 29, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants