i am using Fluent UI in my project.
I initializing my button with this simple code in javascript:
JavaScript
x
9
1
iconProps: {
2
iconName: 'NewFolder',
3
styles: {
4
root: {
5
color: 'orange'
6
},
7
}
8
},
9
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.
JavaScript
1
8
1
<IconButton
2
iconProps={{ iconName: 'NewFolder' }}
3
styles={{
4
root: { color: 'blue' },
5
rootHovered: { color: 'orange' },
6
}}
7
/>
8
Codepen working example
Button styles also might help.