4.1.7 • Published 9 years ago
apeman-react-style v4.1.7
apeman-react-style
apeman react package for style component.
Installation
$ npm install apeman-react-style --save
Usage
Convert react inline style attribute into style tag.
'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>
<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|object | Css string or style data. |
prefix | string | Parent selector for each styles to add. |
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 | 'text/css' |
License
This software is released under the MIT License.
Links
4.1.7
9 years ago
4.1.6
9 years ago
4.1.5
9 years ago
4.1.4
9 years ago
4.1.3
9 years ago
4.1.2
9 years ago
4.1.1
9 years ago
4.1.0
9 years ago
4.0.4
9 years ago
4.0.3
9 years ago
4.0.2
9 years ago
4.0.0
9 years ago
3.0.3
9 years ago
3.0.2
9 years ago
3.0.1
9 years ago
3.0.0
9 years ago
2.7.3
9 years ago
2.7.2
9 years ago
2.7.1
9 years ago
2.7.0
9 years ago
2.6.2
9 years ago
2.6.1
9 years ago
2.6.0
9 years ago
2.5.0
9 years ago
2.4.1
9 years ago
2.4.0
9 years ago
2.2.0
10 years ago
2.1.4
10 years ago
2.1.3
10 years ago
2.1.2
10 years ago
2.1.1
10 years ago
2.1.0
10 years ago
2.0.1
10 years ago
2.0.0
10 years ago
1.3.2
10 years ago
1.3.1
10 years ago
1.3.0
10 years ago
1.2.2
10 years ago
1.2.1
10 years ago
1.2.0
10 years ago
1.1.0
10 years ago
1.0.4
10 years ago
1.0.3
10 years ago
1.0.2
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago