天天看點

[React] Styling a React button component with Radium

React's inline styles allow components to stand on their own by not requiring any external CSS. However HTML's style attributes don't support pseudo selectors like <code>:hover</code> and <code>:active</code>. By using Radium to listen to mouse events we can restore <code>:hover</code> and <code>:active</code> selectors to inline styles.

So, just need to wrap the compoment in to Radium() method.