0.2.2 • Published 7 years ago

react-teleport-me v0.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

react-teleport-me

React component to teleport component render to body.

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install react-teleport-me --save

Usage

import Teleport from 'react-teleport-me';

class App extends Component {
    render = () => {
        const {
            active,
        } = this.props;

        return active ? (
            <Teleport>
                <section
                    className="app">
                    Hello There
                </section>
            </Teleport>
            ) : null;
    }
}

You can set the lockBody property to true to add the zvui_teleport-lock class to the body. Scroll position and body properties to block scroll will be handled automatically

Dependencies

Dev Dependencies

License

MIT

Generated by package-json-to-readme