import React from "react";
import { IconButtonContainer, IconButtonStyled } from "./IconButton.styled";
import PropTypes from "prop-types";

export const IconButton = (props) => {
  return (
    <IconButtonContainer
      style={props.containerStyle}
      className={props.className}
    >
      <IconButtonStyled
        disabled={props.disabled}
        onClick={props.onClick}
        sx={props.style}
        iconcolor={props.iconColor}
      >
        {props.children}
      </IconButtonStyled>
    </IconButtonContainer>
  );
};

IconButton.propTypes = {
  children: PropTypes.node,
  onClick: PropTypes.func,
  containerStyle: PropTypes.any,
  style: PropTypes.any,
  className: PropTypes.string,
  iconColor: PropTypes.string,
  disabled: PropTypes.bool,
};
