@visuality.js/react-fullscreen

FullScreen component for React apps.


Keywords
react, react-component, typescript, typescript-library
License
Apache-2.0
Install
npm install @visuality.js/react-fullscreen@0.1.0

Documentation

At a Glance

react-fullscreen is a component for React apps that allows to control full-screen presentation.

How to Get Started

If you use NPM, type in terminal:

npm install --save "@visuality.js/react-fullscreen"

If you prefer Yarn, type:

yarn add "@visuality.js/react-fullscreen"

Usage

Simply wrap up any part of your layout with FullScreen component:

import { FullScreen } from '@visuality.js/react-fullscreen';

// ...

render = () => {
    return (
        <div>
            <h1>Title</h1>
            <FullScreen enabled={this.state.fullScreenVideo}>
                <video
                    onClick={() => {
                        this.setState({
                            ...this.state,
                            fullScreenVideo: true,
                        })
                    }}
                >
                </video>
            </FullScreen>
        </div>
    );
}

License

react-fullscreen is available under the Apache 2.0 license. See the LICENSE file for more info.