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

[Button] Add magic variant #11711

Closed
wants to merge 2 commits into from
Closed

[Button] Add magic variant #11711

wants to merge 2 commits into from

Conversation

snamoah
Copy link

@snamoah snamoah commented Mar 11, 2024

WHY are these changes introduced?

There is currently no magic variant button which is required for some parts of Shop Campaigns UI. See screenshot below:
Screenshot 2024-03-11 at 9 05 48 AM

Figma link

WHAT is this pull request doing?

  1. Adds .variantMagic class definition in Button.module.scss.
  2. Extends variant prop type on Button to include magic
  3. Adds Storybook entries for magic variant
Screenshot 2024-03-11 at 9 28 14 AM

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

🎩 checklist

@snamoah snamoah marked this pull request as ready for review March 11, 2024 13:33
@snamoah snamoah changed the title [Button] Add magic variant to button [Button] Add magic variant Mar 11, 2024
@sam-b-rose
Copy link
Member

Hi @snamoah! Thanks for the contribution 🚀

We've used magic for the tone prop on other components such as Badge. This might be a good pattern to apply to Button as well. Magic is similar to other tone color treatment like "success" and "critical". It would be good to built it so that other Button variants benefit from this as well (e.i., variant="primary" tone="magic").

@snamoah
Copy link
Author

snamoah commented Mar 11, 2024

It would be good to built it so that other Button variants benefit from this as well (e.i., variant="primary" tone="magic").

I see, yeah.. thanks for the context there. I'll update the tone prop instead of variant 👍🏾

@snamoah
Copy link
Author

snamoah commented Mar 12, 2024

I'm closing this pr for now. It seems not supporting magic tone for button is an intended design decision. See slack thread for more context

@snamoah snamoah closed this Mar 12, 2024
@snamoah snamoah deleted the add-magic-variant-to-button branch March 12, 2024 16:01
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