/* eslint-disable react/jsx-props-no-spreading */
import React from 'react';
import styled from 'styled-components';
import IconButton, { IconButtonProps } from '@material-ui/core/IconButton';

import { ThemeObject } from '../Theme';

export const StyledIconButton = styled(
  (props: IconButtonProps & { $theme: ThemeObject; $color: keyof ThemeObject['pallet'] }) => <IconButton {...props} />
)`
  && {
    color: ${(props) => props.$theme.pallet[props.$color]};
    transition: all 0.25s;
  }
`;
