import React, { FC } from 'react';
import Icon from '../../images/zoomDown.svg';
import classnames from 'classnames';
import { SCALE_MIN } from '../../const';

interface IProps {
  onClick: () => void;
  scale: number;
}

const ZoomDownButton: FC<IProps> = ({ onClick, scale }) => {
  return (
    <div
      className={classnames('slot', {
        disable: scale <= SCALE_MIN,
      })}
      onClick={onClick}
    >
      <Icon className="logo" />
    </div>
  );
};

export default ZoomDownButton;
