javascript - Styling a link on hover - with Radium in React -
i've been looking answer here , in documentation, can't seem find it. here's radium documentation.
i'd know if there's way style links in react? a, a:hover, a:visited etc.
example:
var react = require("react"); var radium = require('radium'); var link = require('react-router').link var header = react.createclass({ render: function(){ var styles={ links: { ":hover": {color: "red", textdecoration: "none"} } } return( <div style={[styles.links]}> <link to="/photos">photos</link> </div> ); } }); module.exports = radium(header);
you can't react's style
property can't standard html inline styles. includes using css pseudo classes.
instead, assign class react component via classname
property , apply styles class in css style-sheet:
return( <div classname="my-link"> <link to="/photos">photos</link> </div> );
Comments
Post a Comment