Skip to content
This repository has been archived by the owner. It is now read-only.
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

react-fixed-page

npm Build Status

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

Install

npm i --save-dev react-fixed-page-ms

Props

This component has a single prop fixed. You should render this element with fixed to prevent the page from scrolling.

Usage

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

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

About

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

Resources

License

Packages

No packages published