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

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

export default function Policy({ text, ...props }: PolicyProps) {
  return (
    <div {...props} className={cn("w-full", props.className)}>
      {text && (
        <Typography
          as="p"
          font="inter"
          size="xs"
          {...text}
          className={cn("text-[#6B7280]", text.className)}
        />
      )}
    </div>
  );
}
