Add text component to the whiteboard#26
Merged
xhulia028 merged 2 commits intofeature_branchfrom May 29, 2025
Merged
Conversation
xhulia028
suggested changes
May 25, 2025
Collaborator
There was a problem hiding this comment.
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.
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.' |
xhulia028
approved these changes
May 27, 2025
leon-liang
reviewed
May 28, 2025
| variant="ghost" | ||
| size="sm" | ||
| onClick={() => setIsBold(!isBold)} | ||
| className={`h-7 w-7 p-1 ${isBold ? 'bg-slate-200' : ''}`} |
Collaborator
There was a problem hiding this comment.
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'} |
Collaborator
There was a problem hiding this comment.
can you please add this the tailwind.config file?
| }, [nodes, setNodes]); | ||
|
|
||
| return ( | ||
| <div style={{ width: "100vw", height: "100vh" }}> |
Collaborator
There was a problem hiding this comment.
tailwind equivalent would be w-screen and h-screen
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.

