0.4.0 • Published 6 years ago
full-height-hoc v0.4.0
full-height-hoc
Loop over DOM elements setting/unsetting height to 100% so you can use flexbox
height
Install
$ npm install full-height-hoc --save
Usage
import React, { Component } from 'react'
import withFullHeight from 'full-height-hoc'
class RandomComp extends Component {
...
}
export default withFullHeight(RandomComp)
Or with your own list of selectors
import React, { Component } from 'react'
import withFullHeight from 'full-height-hoc'
class RandomComp extends Component {
...
}
export default withFullHeight(RandomComp, ['section', 'body', '.content', '#container'])
Demo
MIT © Jack Hanford