/* eslint no-console: 0 */
import React from 'react'
import LoadMask from './'
// real-import:import {LoadMask} from 'tocco-ui'

class Example extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      loaded: false
    }
  }

  shouldComponentUpdate(nextProps, nextState) {
    return true
  }

  render() {
    return (
      <div style={{height: '100px'}}>
        {/* start example */}
        <button onClick={() => {
          console.log('this.state.loaded', this.state.loaded)
          this.setState({loaded: !this.state.loaded})
        }}
        style={{position: 'absolute', zIndex: 1, right: 10}}>Load
        </button>
        <LoadMask
          required={[this.state.loaded]}
          loadingText="Loading..."
        >
          <span>loaded</span>
        </LoadMask>
        {/* end example */}
      </div>
    )
  }
}

export default () => <Example/>

@@ -434,25 +434,8 @@
 tton
- onClick=%7B() =%3E %7B
 %0A   
@@ -445,69 +445,22 @@
     
-c
 on
-sole.log('this.state.loaded', this.state.loaded)%0A         
+Click=%7B() =%3E
  thi
@@ -503,20 +503,12 @@
 ed%7D)
+%7D
 %0A  
-      %7D%7D%0A
     
@@ -563,17 +563,37 @@
 ht: 10%7D%7D
-%3E
+%0A        %3E%0A          
 Load%0A   

remove unnecessary log statement from example