Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

patchkit/patchkit-vertical-filled

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vertical Filled Container

A container-component that will take the full vertical space, and resize with the window.

import VerticalFilledContainer from 'patchkit-vertical-filled'

<VerticalFilledContainer>
  This container will extend to the bottom of the screen, even when you resize.
</VerticalFilledContainer>

You can use the decorator to add the behavior to another component. This is the actual definition of <VerticalFilledContainer>:

import { verticalFilled } from 'patchkit-vertical-filled'

class _VerticalFilledContainer extends React.Component {
  render() {
    var style = { position: 'relative', overflow: 'auto' }
    
    if (this.props.height)
      style.height = this.props.height

    if (this.props.style && typeof this.props.style == 'object') {
      for (var k in this.props.style)
        style[k] = this.props.style[k]
    }

    return <div className="vertical-filled" {...this.props} style={style}>{this.props.children||''}</div>
  }
}
var VerticalFilledContainer = verticalFilled(_VerticalFilledContainer)

About

Height: 100% that works

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.