import './Empty.less'
import { Component } from '@tarojs/taro'
import { View, Image } from '@tarojs/components'

type EmptyProps = {
  /**
   * 页面为空显示的图片
   */
  img: string
  /**
   * 页面为空的提示
   */
  tips: string
}

export default class Empty extends Component<EmptyProps> {
  static options = {
    addGlobalClass: true,
  }

  render() {
    const { img, tips } = this.props

    return (
      <View className='empty-component'>
        <Image className={`empty_pic`} src={img}></Image>
        <View className={`tips_color`}>{tips}</View>
      </View>
    )
  }
}
