import { Button, View } from "@tarojs/components"; interface IProps { onClick?: (e:any)=> void disabled?: boolean className?: string type?: 'primary'|'normal'|'danger' children: JSX.Element|JSX.Element[]|string style?: React.CSSProperties } export default function WemetaButton({ onClick, type = 'primary', disabled = false, className='', style, children }:IProps) { let typeClass = '' if(type ==='danger'){ typeClass = 'bg-white text-red' }else if(type ==='primary'){ typeClass = 'bg-primary text-white' }else{ typeClass = 'bg-white' } const handleClick = (e:any)=> { if(!disabled){ onClick && onClick(e) } } return ( ); }