import React from 'react';
import CloseRoundedIcon from '@mui/icons-material/CloseRounded';

export type ResetButtonProps = {
  onClick: () => void;
  isDisabled?: boolean;
};

export const ResetButton = ({ onClick, isDisabled }: ResetButtonProps) => (
  <div className="squiz-gb-scope">
    <button
      type="button"
      aria-label={`Remove selection`}
      title={`Remove selection`}
      className="text-gray-500 hover:text-gray-800 focus:text-gray-800 w-6 h-6 disabled:text-gray-500 disabled:cursor-not-allowed"
      disabled={isDisabled}
      onClick={onClick}
    >
      <CloseRoundedIcon />
    </button>
  </div>
);
