# apeman-react-style

> apeman react package for style component.

Latest version **4.1.7** (published 2016-11-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install apeman-react-style
pnpm add apeman-react-style
yarn add apeman-react-style
bun add apeman-react-style
```

## 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 | 4.1.7 |
| Published | 2016-11-17 |
| First published | 2015-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | React, apeman, react-component, css, style |

## Links

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

## Dependencies (2)

- [iftype](https://npm.io/package/iftype.md) ^3.0.0
- [classnames](https://npm.io/package/classnames.md) ^2.2.5

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 4.1.7 (latest) — 2016-11-17
- 4.1.6 — 2016-08-21
- 4.1.5 — 2016-08-11
- 4.1.4 — 2016-08-02
- 4.1.3 — 2016-07-29
- 4.1.2 — 2016-07-05
- 4.1.1 — 2016-07-05
- 4.1.0 — 2016-07-05
- 4.0.4 — 2016-06-26
- 4.0.3 — 2016-06-20
- 4.0.2 — 2016-06-20
- 4.0.0 — 2016-05-13
- 3.0.3 — 2016-05-12
- 3.0.2 — 2016-05-05
- 3.0.1 — 2016-05-01
- … 31 more at https://npm.io/package/apeman-react-style/versions

## README

apeman-react-style
==========

<!---
This file is generated by ape-tmpl. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/apeman-react-labo/apeman-react-style
[bd_travis_url]: http://travis-ci.org/apeman-react-labo/apeman-react-style
[bd_travis_shield_url]: http://img.shields.io/travis/apeman-react-labo/apeman-react-style.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/apeman-react-labo/apeman-react-style
[bd_travis_com_shield_url]: https://api.travis-ci.com/apeman-react-labo/apeman-react-style.svg?token=
[bd_license_url]: https://github.com/apeman-react-labo/apeman-react-style/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/apeman-react-labo/apeman-react-style
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-react-labo/apeman-react-style.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-react-labo/apeman-react-style.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/apeman-react-labo/apeman-react-style
[bd_gemnasium_shield_url]: https://gemnasium.com/apeman-react-labo/apeman-react-style.svg
[bd_npm_url]: http://www.npmjs.org/package/apeman-react-style
[bd_npm_shield_url]: http://img.shields.io/npm/v/apeman-react-style.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

apeman react package for style component.

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>



<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->

<a name="section-doc-guides-01-installation-md"></a>

Installation
-----

```bash
$ npm install apeman-react-style --save
```


<!-- Section from "doc/guides/01.Installation.md.hbs" End -->

<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->

<a name="section-doc-guides-02-usage-md"></a>

Usage
---------

Convert react inline style attribute into style tag.

```jsx
'use strict'

import React from 'react'
import {ApStyle} from 'apeman-react-style'

const ExampleComponent = React.createClass({
  render () {
    let style01 = {
      'my-component-01 button': {
        backgroundColor: '#FFF',
        color: '#555'
      }
    }
    let style02 = {
      'my-component-02 button': { /* ... */ }
    }
    return (
      <div>
        <ApStyle data={ style01 }/>
        <ApStyle data={ style02 }/>
      </div>
    )
  }
})

```

This will results,

```html
<html>
<head>
    <style type="text/css">
        .my-component-01 button {
            background-color: #FFF;
            color: #555;
        }

        .my-component-02 button {
            /*...*/
        }
    </style>
</head>
</html>
```

### Props
| Key | Type | Description |
| --- | ---- | ------ |
| data | string&#124;object | Css string or style data. |
| prefix | string | Parent selector for each styles to add. |

<!-- Section from "doc/guides/02.Usage.md.hbs" End -->

<!-- Section from "doc/guides/04.Components.md.hbs" Start -->

<a name="section-doc-guides-04-components-md"></a>

Components
-----


### ApStyle

**Props**

| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| data | string|objectOf | null | |  |
| smallMediaData | string|object | null | |  |
| mediumMediaData | string|object | null | |  |
| largeMediaData | string|object | null | |  |
| type | string | &#x27;text/css&#x27; | |  |


<!-- Section from "doc/guides/04.Components.md.hbs" End -->


<!-- Sections Start -->


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/apeman-react-labo/apeman-react-style/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [apeman][apeman_url]
+ [apeman-react-labo][apeman_react_labo_url]
+ [React][react_url]

[apeman_url]: https://github.com/apeman-labo/apeman
[apeman_react_labo_url]: https://github.com/apeman-react-labo
[react_url]: https://facebook.github.io/react/

<!-- Links End -->

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