npm.io
0.4.0 • Published 8 years ago

full-height-hoc

Licence
MIT
Version
0.4.0
Deps
2
Size
14 kB
Vulns
0
Weekly
0
Stars
2

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

Edit o9rvqxyn6z

MIT Jack Hanford

Keywords