Skip to content

feat:badge icon completed#4

Open
asifmehmood101 wants to merge 1 commit intomasterfrom
feat/badge
Open

feat:badge icon completed#4
asifmehmood101 wants to merge 1 commit intomasterfrom
feat/badge

Conversation

@asifmehmood101
Copy link
Copy Markdown
Collaborator

image
image

@asifmehmood101
Copy link
Copy Markdown
Collaborator Author

@Safei-Ashraf please review it ad let me know

Comment thread src/components/Badge/Badge.d.ts
Comment thread src/components/Badge/Badge.stories.tsx
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();
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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

Comment thread src/components/Badge/Badge.test.tsx
color = 'currentColor',
...rest
}: BadgeProps): JSX.Element => {
const icons = {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

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.

2 participants