import React, { PureComponent } from "react";
import { View } from "react-native";
import stylez from "../styles";
import { FontAwesome } from "./Icon";

class TickIcon extends PureComponent {
	render() {
		const size = this.props.diameter || 20;
		const radius = size / 2;
		return (
			<View
				style={[
					stylez.tickBox,
					{ height: size, width: size, borderRadius: radius },
					this.props.color && { backgroundColor: this.props.color },
					this.props.style,
				]}
			>
				<FontAwesome name="check" style={stylez.tickIcon} />
			</View>
		);
	}
}

export { TickIcon };
