i am using Fluent UI in my project.
I initializing my button with this simple code in javascript:
iconProps: { iconName: 'NewFolder', styles: { root: { color: 'orange' }, } },
and i can override default color to asked one.
My question is, how to set mouse hover color over button?
Advertisement
Answer
For IconButton
, DefaultButton
and PrimaryButton
you have property root
for default button style, rootHovered
, rootChecked
etc. for different states.
<IconButton iconProps={{ iconName: 'NewFolder' }} styles={{ root: { color: 'blue' }, rootHovered: { color: 'orange' }, }} />
Codepen working example
Button styles also might help.