import React, { Component } from 'react';

import ActivityIndicator from './ActivityIndicator.js';


import './Button.scss';

/*
 onPress={onPressLearnMore} title="Learn More" color="#841584" accessibilityLabel="Learn more about this purple button"
 */

//stateless component
export default function(props) {

	return (
		<button 
			className="_button_"
			type={ props.type || "button" } 
			onClick={ props.onPress } 
			disabled={ props.disabled || props.loading }>

			{ props.icon ? <span /> : null }

			{ props.title }

			{ props.loading ? <ActivityIndicator show={ true } type="overlay" size="small" /> : null }

		</button>
	);
}
