feat:badge icon completed#4
Open
asifmehmood101 wants to merge 1 commit intomasterfrom
Open
Conversation
Collaborator
asifmehmood101
commented
Mar 11, 2023


Collaborator
Author
|
@Safei-Ashraf please review it ad let me know |
Safei-Ashraf
requested changes
Mar 12, 2023
| it('render Badge with default text content', () => { | ||
| const text = 'Welcome to Badge Component'; | ||
| render(<Badge size={24} name="star" color="red" />); | ||
| expect(screen.getByText(text)).toBeInTheDocument(); |
Owner
There was a problem hiding this comment.
use tailwind custom classes sm, md ,..etc and test for them in the document,
e.g size = "sm" => test case that looks for sm in the document, you don't need to cover all variations, 2 is enough
| color = 'currentColor', | ||
| ...rest | ||
| }: BadgeProps): JSX.Element => { | ||
| const icons = { |
Owner
There was a problem hiding this comment.
store the icon in a separate file, as its own component, refer to Star Icon for example, you can use the same icon/component here.
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.