# react-stylerify

> A browserify wrapper around react-styling

Latest version **1.1.0** (published 2016-03-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-stylerify
pnpm add react-stylerify
yarn add react-stylerify
bun add react-stylerify
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-03-14 |
| First published | 2016-03-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | chrvadala |
| Maintainers | chr.vadala |
| Keywords | browserify, react |

## Links

- npm: https://www.npmjs.com/package/react-stylerify
- Repository: https://github.com/chrvadala/react-stylerify
- Homepage: https://github.com/chrvadala/react-stylerify#readme
- Issues: https://github.com/chrvadala/react-stylerify/issues
- npm.io page: https://npm.io/package/react-stylerify

## Dependencies (3)

- [through](https://npm.io/package/through.md) ^2.3.8
- [traverse](https://npm.io/package/traverse.md) ^0.6.6
- [react-styling](https://npm.io/package/react-styling.md) ^1.4.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2016-03-14
- 1.0.2 — 2016-03-10
- 1.0.1 — 2016-03-08
- 1.0.0 — 2016-03-08

## README

# React stylerify

```
npm install react-stylerify

browserify -t react-stylerify -o build.js main.js
```

React stylerify is a browserify wrapper around [react-styling](https://github.com/halt-hammerzeit/react-styling), that allow to import style from external file through `require('mystyle.radium');` or `require('mystyle.css');` or `require('mystyle.style');`.

## Working example
[This project](https://github.com/chrvadala/react-with-react-template-and-radium) uses [Radium](http://stack.formidable.com/radium/) together with [React Template](http://wix.github.io/react-templates/).

## Usage
```jsx
<Button kind="primary">Radium Button</Button>
```

```jsx
var Radium = require('radium');
var React = require('react');
var styles = require('style.radium')();

// alternately
//var styles = require('style.css')();
//var styles = require('style.style')();

@Radium
class Button extends React.Component {
  static propTypes = {
    kind: React.PropTypes.oneOf(['primary', 'warning']).isRequired
  };

  render() {
    return (
      <button
        style={[
          styles.base,
          styles[this.props.kind]
        ]}>
        {this.props.children}
      </button>
    );
  }
}
```

```css
/* style.radium */
base: {
    color: '#fff';
    :hover{
      background: #0074d9;
    }
}
primary: {
    background: #0074D9;
}

warning: {
    background: #FF4136;
}
```

---
_Source: https://npm.io/package/react-stylerify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
