import { View } from "@tarojs/components";
import style from "./index.module.less";
import ButtonAdd from "@/components/button-add/index";
interface Props {
  onClick?: () => void;
  text: string;
  children?: JSX.Element|JSX.Element[];
}
export default ({text, onClick, children}: Props)=> {
  return (
    <View className={style.card}>
      <View className={style.cardButton} onClick={()=> onClick?.()}>
        <ButtonAdd></ButtonAdd>
        <View className="text-14 font-medium leading-22 text-black">
          {text}
        </View>
      </View>
      {children}
    </View>
  )
}