Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add unit tests for button #111

Merged
merged 3 commits into from
Mar 7, 2024

Conversation

markw-deriv
Copy link
Contributor

Add unit tests for the Button component.

@markw-deriv markw-deriv force-pushed the markwylde/add-unit-tests-for-button branch from b289178 to a7f6af5 Compare March 6, 2024 17:27
@markw-deriv
Copy link
Contributor Author

markw-deriv commented Mar 6, 2024

We are allowing for all three of these lg, md, sm, but lg isn't in the types.

Implementation:

const ButtonRounded = {
    lg: "deriv-button__rounded--lg",
    md: "deriv-button__rounded--md",
    sm: "deriv-button__rounded--sm",
} as const;

Type:

rounded?: Extract<TGenericSizes, "md" | "sm">;

Should we add "lg" to the type?

@niloofar-deriv @shayan-deriv

@markw-deriv markw-deriv requested a review from shayan-deriv March 6, 2024 17:34
@aizad-deriv
Copy link
Contributor

We are allowing for all three of these lg, md, sm, but lg isn't in the types.

Implementation:

const ButtonRounded = {
    lg: "deriv-button__rounded--lg",
    md: "deriv-button__rounded--md",
    sm: "deriv-button__rounded--sm",
} as const;

Type:

rounded?: Extract<TGenericSizes, "md" | "sm">;

Should we add "lg" to the type?

@niloofar-deriv @shayan-deriv

Please add the lg variant for border radius I forgot to add it when I was refactoring the Button component 🙏🏼

@markw-deriv markw-deriv merged commit 5c5fb21 into main Mar 7, 2024
1 check passed
@markw-deriv markw-deriv deleted the markwylde/add-unit-tests-for-button branch March 7, 2024 07:14
Copy link

github-actions bot commented Mar 7, 2024

🎉 This PR is included in version 1.10.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants