react-fullscreen-element
v1.0.2
Published
Fullscreen any dom element with ReactJS
Downloads
254
Readme
Fullscreen any dom element with ReactJS
Installation
npm i react-fullscreen-element
Usage Example
import ReactFullScreenElement from "react-fullscreen-element";
class Demo extends React.Component {
state={
fullscreen: false
}
render(
return(
<div>
<ReactFullScreenElement
fullScreen={this.state.fullscreen}
allowScrollbar={true}
>
<div>
<input type="button" value="Click here to toggle fullscreen" onClick={() => this.setState({fullscreen: !this.state.fullscreen})} />
your code goes here
</div>
</ReactFullScreenElement>
</div>
)
)
}