const useStyles = makeStyles({
buttonStyle: {
background: "red",
"&:hover": {
transitionDelay: '1',
transform: "scale(1.1)",
background: "red",
},
},
});
how can i implemated i transitionDelay on makeStyles? This did not work.
You're missing a few things here:
transitionProperty
to which the transitionDelay
will apply to. In your case, it is the transform
CSS property.transitionDelay
needs to include the units of the delay e.g. 1s
or 1000ms
.&:hover
.This is what it will look like:
const useStyles = makeStyles({
buttonStyle: {
background: "red",
transitionProperty: "transform",
transitionDelay: "1s",
"&:hover": {
transform: "scale(1.1)",
background: "red",
},
},
});