import Typography, {
  TypographyProps,
} from "@/components/ui/Typography/Typography";
import { cn } from "@/lib/utils";

interface TrustedByOverProps extends React.ComponentProps<"div"> {
  icon?: React.ReactNode;
  text?: TypographyProps<"p">;
}

export default function TrustedByOver({
  icon,
  text,
  ...props
}: TrustedByOverProps) {
  return (
    <div
      {...props}
      className={cn("flex items-center justify-center gap-2", props.className)}
    >
      {icon}
      {text && (
        <Typography
          as="p"
          font="inter"
          size="sm"
          align="center"
          {...text}
          className={cn("text-[#6B7280]", text.className)}
        />
      )}
    </div>
  );
}
