How to use the react-free-style.injectStyle function in react-free-style

To help you get started, we’ve selected a few react-free-style examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MicheleBertoli / css-in-js / react-free-style / button.js View on Github external
borderRadius: '5px',
  border: 'none',
  outline: 'none',
  '&:hover': {
    color: '#fff',
  },
  '&:active': {
    position: 'relative',
    top: '2px'
  },
  '@media (max-width: 480px)': {
    width: '160px'
  }
});

@injectStyle(Style)
class Button extends Component {
  render() {
    return (
      <div>
        <button>Click me!</button>
        
      </div>
    );
  }
};

React.render(<button>, document.getElementById('content'));
</button>

react-free-style

Make React components easier and more maintainable by using JavaScript with Free Style

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis