import { Icon } from '../iconography';
import './stack-icon.css';

type StackIconProps = {
  type: 'create';
  children: React.ReactNode;
  size?: number;
};

export function StackIcon({ type, children, size = 18 }: StackIconProps) {
  return (
    <span className="c-stack-icon">
      {type === 'create' && (
        <span style={{ width: size, height: size }} className="c-stack-icon__icon">
          <Icon.Add width={size - 4} height={size - 4} />
        </span>
      )}
      {children}
    </span>
  );
}
