import { Space } from "antd";
import React, { FC, ReactNode } from "react";

export type LabeledIconProps = {
  labelOnly?: boolean;
  Icon?: ReactNode;
  rightText?: string;
  leftText?: string;
  className?: string;
};
const LabeledIcon: FC<LabeledIconProps> = (props) => {
  const { rightText, leftText, Icon } = props;
  return (
    <Space className="field-right-values">
      {leftText && <span className="left-text">{leftText}</span>}
      <span className="mid-icon">{Icon && Icon}</span>
      {rightText && <span className="right-text">{rightText}</span>}
    </Space>
  );
};

export default LabeledIcon;
