import { View } from "@tarojs/components";


export const EmptyDataTitle = ({children}) => {
  return <View className='text-16 text-black font-medium text-center leading-24 mt-20 font-pingfangSCMedium'>{children}</View>
}
export const EmptyDataSubInfo= ({children}) => {
  return <View className='leading-28 text-gray-4 text-14 text-center'>{children}</View>
}

interface IProps {
  type?: 'plane'|'search'|'chat' | 'box' | 'whiteboard' | 'triangle' | (string & {}),
  text?: string,
  children?: JSX.Element|JSX.Element[]
  className?: string
}

export default ({type = 'plane', className='', text = '暂无数据', children}: IProps)=> {
  return (
    <View className={`flex flex-col items-center mt-44 ${className}`}>
      <View className={`data-empty data-empty-${type}`}></View>
      {children ? children : <EmptyDataTitle>{text}</EmptyDataTitle>}
    </View>
  )
}


