change icon color with design ant

Asked

Viewed 206 times

-2

I would like to change the color of an icon when I do a Hover, I am using ant design

<button className="button1">
                <div className="content">
                    <Icon type="plus" style={{fontSize: '64px', color: '#ffff'}}/>
                </div>
</button>

I have no idea how to change the color

  • "#Content:Hover { background:#ffEE00; }" Have you tried this?

1 answer

0


Hello,

You commented that you are using ant.design and its structure seems to be using JSX. You have already tried to import the ant button? You can use it?

Usually the library already builds a strong style to keep your entire site looking the same, but if you want to change the color of the Hover you can use direct css by applying the classname with the :hover{} or use Styled-Component styling the Komponent Button const ButtonS = styled(Button).

The icon generates an i, so you need to change the color of the :hover i {}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.