| 17 | |
| 18 | @pureRender |
| 19 | export default class extends Component { |
| 20 | |
| 21 | static defaultProps = { |
| 22 | textStyle: null, |
| 23 | } |
| 24 | |
| 25 | getComputedStyles = () => { |
| 26 | const {textStyle} = this.props |
| 27 | |
| 28 | return { |
| 29 | text: textStyle |
| 30 | ? prefix({...styles.text, ...textStyle}) |
| 31 | : styles.text, |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | toggleFullscreen = () => screenfull.toggle() |
| 36 | |
| 37 | render() { |
| 38 | const computedStyles = this.getComputedStyles() |
| 39 | |
| 40 | return ( |
| 41 | <div |
| 42 | style={computedStyles.text} |
| 43 | onClick={this.toggleFullscreen} |
| 44 | > |
| 45 | Fullscreen |
| 46 | </div> |
| 47 | ) |
| 48 | } |
| 49 | } |