Repository navigation
feat: add textareafield component - #2641
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
artursantiago
marked this pull request as ready for review
January 30, 2025 17:43
artursantiago
requested review from
renatamottam and
renatomaurovtex
and removed request for
a team
January 30, 2025 17:43
artursantiago
force-pushed
the
feat/add-textareafield-component
branch
2 times, most recently
from
February 6, 2025 20:24
b00cdc0 to
21833cd
Compare
Guilera
force-pushed
the
feat/add-textareafield-component
branch
from
February 14, 2025 14:09
21833cd to
dd90a81
Compare
artursantiago
force-pushed
the
feat/add-textareafield-component
branch
from
February 14, 2025 16:56
dd90a81 to
5626c49
Compare
artursantiago
force-pushed
the
feat/add-textareafield-component
branch
from
February 17, 2025 18:58
5626c49 to
22edccf
Compare
hellofanny
reviewed
Feb 17, 2025
pedromtec
approved these changes
Feb 17, 2025
Co-authored-by: Fanny Chien <[email protected]>
hellofanny
reviewed
Feb 18, 2025
Contributor
|
@mariana-caetano JLYK Doc request for this new component. |
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.
What's the purpose of this pull request?
This pull request adds the TextareaField atom component based on the InputField component. This component will be used in the form of the modal for adding a review to a product in the new Reviews and Ratings section.
How does it work?
This PR introduces the
TextareaFieldmolecule component, which extends the functionality of theTextareacomponent. It accepts additional props such asid,label,error, anddisabled, alongside all the standard props of theTextareacomponent.The
TextareaFielduses theTextareacomponent internally. One thing to pay attention in this implementation is related to the label used in the add new review form. In the Figma design, the label text is very long, which could either exceed the width of theTextareaor break into multiple lines, overlapping the text area.To solve this, I added a logic using a
useEffecthook to dynamically calculate the width of theTextareaand set it as themax-widthof the label. Additionally, thetext-overflow: ellipsisstyle is applied to truncate the label text if it exceeds the defined width.How to test it?
Starters Deploy Preview
Preview
References
JIRA TASK: SFS-2076
Figma