//@flow
import * as React from 'react';
import {
	InputGroupAddon,
	Button,
} from 'reactstrap';

type Props = {
	deleteFunc: (any) => any,
}

// super simple wrapper for a button that attaches to an input
// styled like a Delete button
const DeleteInputBtn = ({ deleteFunc }: Props) => (
	<InputGroupAddon addonType='prepend'>
		<Button
			color='danger'
			onClick={(e) => deleteFunc(e)}
		>
			X
		</Button>
	</InputGroupAddon>
);

export default DeleteInputBtn;
