import React from 'react'
import { View } from '@tarojs/components'
import Spin from '.'

import './style.less'

export default (props) => {
  const { spinning, style, ...leftProps } = props

  return spinning ? (
    <View className='spin2box' style={style}>
      <View className='spin2'>
        {spinning && <Spin {...leftProps} />}
      </View>
    </View>
  ) : null
}
