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

Custom primaryColor not working for Modal.method() Ok/Cancel buttons #39559

Closed
ovoloshchenko opened this issue Dec 14, 2022 · 2 comments
Closed

Comments

@ovoloshchenko
Copy link

ovoloshchenko commented Dec 14, 2022

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Wrap application with ConfigProvider and provide custom primaryColor (as mentioned in "Customize Theme" docs)
  2. Add a type='primary' button - it will have a custom color provided in ConfigProvider
  3. Add onClick method to the button which will open Model.confirm({}) window.
  4. Observe OK button in the confirm modal

What is expected?

OK button in confirmation modal (Modal.confirm() or other Modal[method]()) has a color provided by the developer in ConfigProvider

What is actually happening?

OK button in confirmation modal has a default ant color

Environment Info
antd 5.0.7
React 16.x
System Mac OS Ventura
Browser Latest Chrome
@ovoloshchenko ovoloshchenko changed the title Custom primaryColor not working for Modal.method() OK button Custom primaryColor not working for Modal.method() Ok/Cancel buttons Dec 14, 2022
@MadCcc
Copy link
Member

MadCcc commented Dec 15, 2022

Dynamic theming will not work with static methods in V5 by default, you could try this: https://github.com/ant-design/ant-design/blob/feature/components/app/index.en-US.md#global-scene-redux-scene

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

No branches or pull requests

2 participants