import React, {Component} from 'react';
import {View, Text, TextInput, TouchableOpacity, Platform} from 'react-native';
import {colors} from '../assets/styles/colors-theme';
import {width, height} from '../services/screen';
import MaterialCommunityIcons from 'react-native-vector-icons/dist/MaterialCommunityIcons';

MaterialCommunityIcons.loadFont();
class CustomSmallButton extends Component {
  render() {
    return (
      <TouchableOpacity
        onPress={() => this.props.onPress && this.props.onPress()}
        style={{
          backgroundColor:
            this.props.color != null
              ? this.props.color
              : colors.shoppingGroupColor,
          height: 35,
          borderRadius: 15,
          width: 120,
          justifyContent: 'center',
          alignItems: 'center',

          flexDirection: 'row',
        }}>
        <MaterialCommunityIcons name={this.props.iconName} size = {20}/>
        <Text
          style={{
            color:
              this.props.textColor != null ? this.props.textColor : 'black',
            fontSize: 12,
            marginLeft: 5,
          }}>
          {this.props.title}
        </Text>
      </TouchableOpacity>
    );
  }
}
export default CustomSmallButton;
