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

Modal primaryAction with prop destructive not work #11006

Closed
nhatvohoang opened this issue Oct 20, 2023 · 0 comments · Fixed by #11028
Closed

Modal primaryAction with prop destructive not work #11006

nhatvohoang opened this issue Oct 20, 2023 · 0 comments · Fixed by #11028
Assignees
Labels
Bug Something is broken and not working as intended in the system.

Comments

@nhatvohoang
Copy link

Issue summary

I use Modal component with primaryAction prop. i want the button become red color but it color is primary color

image
image

Expected behavior

image

@kyledurand kyledurand self-assigned this Oct 23, 2023
@kyledurand kyledurand added Bug Something is broken and not working as intended in the system. and removed untriaged labels Oct 23, 2023
chloerice added a commit that referenced this issue Oct 25, 2023
<!--
  ☝️How to write a good PR title:
- Prefix it with [ComponentName] (if applicable), for example: [Button]
  - Start with a verb, for example: Add, Delete, Improve, Fix…
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

### WHY are these changes introduced?

Fixes #10995
Fixes #11006

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

Fixes the `buttonFrom` util not mapping the action parameter's boolean
variant properties to `variant` and `tone`.

| Before | [After]() |
|--------|--------|
| <img width="665" alt="Screenshot 2023-10-25 at 4 03 52 PM"
src="https://github.com/Shopify/polaris/assets/18447883/a3dfa184-c0ce-465c-97ea-32e5f6cfff86">|
<img width="671" alt="Screenshot 2023-10-25 at 4 02 41 PM"
src="https://github.com/Shopify/polaris/assets/18447883/1b85d1ed-4804-4776-a168-a551ff298102">|

### 🎩 checklist

- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [x] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [x] Updated the component's `README.md` with documentation changes
- [x] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system.
Projects
None yet
2 participants