I am new to ant design 5 and I’ve gone through the docs and I can’t seem to find a way to style a single button component without affecting other buttons.
What I want is to change the hover background color of only the following link button:
<Button type={"link"} href={link} >{cta}</Button>
without affecting other link buttons. How can that be achieved?
2
Answers
You can use a nested ConfigProvider:
Or use Button
style
prop passing inline styles:Or use
className
prop and style it using acss
file:This can simply be achieved by using inline CSS or creating a custom CSS class for the specific button.
SAMPLE DEMO