apeman-react-mixin-layout
1.1.0 • Public • Published apeman-react-mixin-layout
apeman react package for layout mixin
Installation
$ npm install apeman-react-mixin-layout --save
Usage
'use strict'
import React from 'react'
import {ApLayoutMixin} from 'apeman-react-mixin-layout'
const ExampleComponent = React.createClass({
mixins: [
ApLayoutMixin
],
render () {
const s = this
let { layouts } = s
return (
<div style={ layouts.main }>{ }</div>
)
},
getInitialLayouts () {
return {
main: { height: 100 }
}
},
calcLayouts () {
let rect = document.getElementById('outer-dom').getBoundingClientRect()
return {
main: {
height: rect.height + 20
}
}
}
})
License
This software is released under the MIT License.
Links
Package Sidebar
Install
npm i apeman-react-mixin-layout
Weekly Downloads