I am trying to remove underline on hover state. I've added:
':hover': {
color: textColourHover,
textDecoration: 'none'
},
...but doesn't appear to work. Any ideas? Thanks.
Here's some code I just wrote that works:
import React, { Component } from "react";
import Radium from "radium";
@Radium
class TestComponent extends Component {
render() {
return (
<a href="#" style={styles.link}>test link</a>
);
}
}
const styles = {
link: {
color: "white",
":hover": {
textDecoration: "none",
color: "red",
},
},
};
export default TestComponent;
Are there errors in your console?
Thanks for code snippet @froatsnook. Your comment allowed me to see an error in my code; my :hover selector was outside the link object.
Please close.
Hey @willhalling, glad I could help. I can't close since I'm not a contributor. But I think you can close since it's your issue!
Thanks @froatsnook. I've now closed.
Most helpful comment
Here's some code I just wrote that works:
Are there errors in your console?