import { ReactNode } from "react";
import { Text } from "../atoms";

export type IconTextProps = {
  children: string;
  icon: ReactNode;
  size?: "small" | "medium" | "large" | null | undefined;
};

export default function IconText({
  children,
  icon,
  size = "medium",
}: IconTextProps) {
  return (
    <span className="fl-flex fl-items-center fl-space-x-2">
      {icon}
      <Text size={size}>{children}</Text>
    </span>
  );
}
