0.0.1 • Published 8 years ago

react-widen v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

react-widen

Widen a React component.

Build Status npm version

Widen a React component. Mostly useful for headers and footers that need to span the entire width of the screen.

Installation

npm install --save react-widen

Usage

import widen from 'react-widen'

import MyComponent from './MyComponent'

export default widen()(MyComponent)

API

widen(amount: number | string = '1000px')

Extends the left and right edges of the wrapped component by the specified amount.

Parameters

  • amount (string | number): The amount to extend the edges by. If a number is provided, the string px is automatically appended. Defaults to 1000px.

Notes

To prevent horizontal scrolling, the <html> and <body> elements should have overflow-x: hidden applied.

License

MIT