import { View } from '@tarojs/components'
import { memo } from 'react'
import style from './index.module.scss'
import Loading from '@/components/loading'

interface Params {
  styleLoading?: Object
  title?: string
  loadingIcon?: false|true
}
const LoadingCard = ({
  styleLoading = {},
  title = '加载中...', // 显示的文字
  loadingIcon = true, // 是否显示加载图标
}: Params) => {
  console.log('loadingCard:::')
  return (
    <>
      <View className={style.loadingCard_main}>
        {loadingIcon && <Loading />}
        <View className={style.loading_text}>{title}</View>
      </View>
    </>
  )
}
export default memo(LoadingCard)
