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

Config Provider API does not allow customization for button text. #41291

Closed
Danishkhurshid opened this issue Mar 16, 2023 · 7 comments
Closed

Comments

@Danishkhurshid
Copy link

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Customizing text for AntD button through Config Provider doesn't work. Above is the link to codesandbox that displays a button component.

What is expected?

I expect the button text to change change on hover but it doesn't.

What is actually happening?

I have played around all the text variables but nothing seems to be working. Ideally applying colorPrimaryTextHover should change the color of the button text but it doesn't.

Environment Info
antd 5.3.1
React "react": "^18.2.0",
System mac m1
Browser chrome
@Danishkhurshid Danishkhurshid changed the title Config Provider API does not allow customization for buttons. Config Provider API does not allow customization for button text. Mar 16, 2023
@zombieJ
Copy link
Member

zombieJ commented Mar 17, 2023

@zombieJ zombieJ closed this as completed Mar 17, 2023
@zombieJ
Copy link
Member

zombieJ commented Mar 17, 2023

Button token can find here:
https://ant.design/components/button#design-token

截屏2023-03-17 11 04 18

@Danishkhurshid
Copy link
Author

@zombieJ how would you change the button text color on hover? Don't see any token for that?

@coderbahrom
Copy link

colorTextLightSolid: https://codesandbox.io/s/antd-btn-color-forked-kze7iy?file=/src/App.tsx:270-289

but this is not working on your colorPrimaryTextHover: "green"

@a-giovana
Copy link

@Danishkhurshid I'm having the exact same problem. how did you manage to resolve it?

@Danishkhurshid
Copy link
Author

@a-giovana We ended up replacing ant with our own design system because of all the issues we were running into.

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

No branches or pull requests

4 participants