0.0.1 • Published 10 years ago
react-widen v0.0.1
react-widen
Widen a React component.
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-widenUsage
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 stringpxis automatically appended. Defaults to1000px.
Notes
To prevent horizontal scrolling, the <html> and <body> elements should have overflow-x: hidden applied.
License
MIT
0.0.1
10 years ago