react-fixed-page

1.0.1 • Public • Published

npm Build Status react-fixed-page

Declaratively fix the underlying scrolling element of a page for use in overlay elements

Install

yarn add react-fixed-page

Props

This component has a single prop named fixed. You should render this element with fixed={true} to fix the page from scrolling.

Usage

import FixedPage from 'react-fixed-page';
import React, { Component } from 'react';

export default class MyModal extends Component {
  render() {
    const { open } = this.props;
    return (
      <div>
        { open ? this.renderModal() : null }
        <FixedPage fixed={open}/>
      </div>
    );
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i react-fixed-page

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • fast.model