react-fullscreen

0.1.0 • Public • Published

react-fullscreen

Build Status npm David David

React component that fullscreens a child component. Responds to browser resizes.

Example

import FullScreen from 'react-fullscreen';
import MyChildComponent from './MyChildComponent';
 
const rootInstance = React.render(
  <FullScreen>
    <MyChildComponent />
  </FullScreen>,
  document.getElementById('someID')
);
import React from 'react';
 
export default class MyChildComponent extends React.Component {
  render() {
    return <SomeJSX style={{
      width: this.props.width,
      height: this.props.height
    }}/>;
  }
}
 
MyChildComponent.propTypes = {
  width: React.PropTypes.number,
  height: React.PropTypes.number
};

/react-fullscreen/

    Package Sidebar

    Install

    npm i react-fullscreen

    Weekly Downloads

    250

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • thomwright