import React from 'react'
import { Spin } from 'antd'

export default (props) => {
  const loading = typeof props.loading === 'boolean' ? props.loading : false

  return (
    <Spin spinning={loading} tip={props.loadingTip}>
      <div style={{ background: '#fff', padding: '2em' }}>{props.children}</div>
    </Spin>
  )
}
