import * as React from "react";

interface UserAddButtonProps {
  text?: string;
  onClick?: (any) => void;
}

const UserAddButton: React.FC<UserAddButtonProps> = props => {
  const { text, onClick } = props;

  const handleOnClickUserAddButton = () => {
    onClick(text);
  };

  return (
    <button onClick={handleOnClickUserAddButton} title={text}>
      add it
    </button>
  );
};

export default UserAddButton;
