react-widen

0.0.1 • Public • Published

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

Package Sidebar

Install

npm i react-widen

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • apalm