# react-redux-theme-provider

> React helpers for theming components

Latest version **0.1.6** (published 2016-12-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-redux-theme-provider
pnpm add react-redux-theme-provider
yarn add react-redux-theme-provider
bun add react-redux-theme-provider
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2016-12-13 |
| First published | 2016-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Jordan Schroter |
| Maintainers | jschr |

## Links

- npm: https://www.npmjs.com/package/react-redux-theme-provider
- Repository: https://github.com/jschr/react-redux-theme-provider
- Homepage: https://github.com/jschr/react-redux-theme-provider#readme
- Issues: https://github.com/jschr/react-redux-theme-provider/issues
- npm.io page: https://npm.io/package/react-redux-theme-provider

## Recent versions

- 0.1.6 (latest) — 2016-12-13
- 0.1.5 — 2016-10-29
- 0.1.4 — 2016-10-29
- 0.1.3 — 2016-10-29
- 0.1.2 — 2016-10-29
- 0.1.1 — 2016-10-28
- 0.1.0 — 2016-10-28
- 0.0.1 — 2016-10-28

## README

# react-redux-theme-provider

[![npm](https://img.shields.io/npm/v/react-redux-theme-provider.svg?style=flat-square)](https://www.npmjs.com/package/react-redux-theme-provider)

React helpers for theming components. Works great with inline styles or any css-in-js library.

## Installation

React 15.3.0 and Redux 3.0.0 or later are peer dependencies.

```
npm install --save react-redux-theme-provider
```

## Usage

```js
// MyApp.js

import { withTheme, ThemeProvider } from 'react-redux-theme-provider'

function MyApp({ theme }) {
  return (
    <ThemeProvider theme={theme}>
      <MyThemedComponent />
    </ThemeProvider>
  )
}

// theme variables
export default withTheme({
  primaryColor: 'blue'
})

// or theme variables as a function of props
export default withTheme(props => {
  primaryColor: props.primaryColor
})
```

```js
// MyThemedComponent.js

import { withStyles } from 'react-redux-theme-provider'

function MyThemedComponent({ styles }) {
  return (
    <div style={styles.base} />
  )
}

export default withStyles(theme => ({
  base: {
    background: theme.primaryColor
  }
}))(MyThemedComponent)

```

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