How to set “a:link{…}” via variable in React JS?
const styles = {
fontSize: 15,
a: {
link: {
color: "red"
},
visited": {
}
},
But don’t work, Pl help me.
How to set “a:link{…}” via variable in React JS?
const styles = {
fontSize: 15,
a: {
link: {
color: "red"
},
visited": {
}
},
But don’t work, Pl help me.
What are you doing with your styles variable???
And what kind of styling system are you using? CSS, SASS, CSS-in-JS?
you can’t set :link (for unvisited links) and :visited (for visited) with inline styles.
you can either define an additional css stylsheet, or you can also use something like https://github.com/styled-components/styled-components
which supports most css features
I would like to pass it into React Component
.