import { Button, View } from "@tarojs/components";
import './Buttons.scss'
import { ButtonType, ComponentStatus } from "../utils/types";

import {Button as RNButton} from 'react-native' ;



export default function Buttons(props: { title: string, type?: ButtonType, status?: ComponentStatus,onClick?:()=>void,style?:any }) {
    
    const myStyle = props.status == ComponentStatus.disable ? { opacity: 0.4 } : {}
    return (
        <View style={{...myStyle}}>
            <Button className={props.type == ButtonType.outline ? 'outline_btn' : 'btn'} style={{...props.style}} onClick={props.onClick}>{props.title}</Button>
        </View>

    )
}