//@ts-nocheck
import React from 'react';
import { TouchableOpacity } from 'react-native';
import PropTypes from 'prop-types';
class MButton extends React.Component {
  constructor(props) {
    super(props);
  }

  render() {
    return (
      <TouchableOpacity
        {...this.props}
        activeOpacity={0.9}
        onPress={() => {
          if (this.disable !== true && this.props.onPress !== undefined) {
            this.disable = true;
            this.props.onPress();
            setTimeout(() => {
              this.disable = false;
            }, 100);
          }
        }}
      />
    );
  }
}
MButton.propTypes = {
  onPress: PropTypes.func,
  children: PropTypes.any,
  styles: PropTypes.array,
};
export default MButton;
