import React, { forwardRef, InputHTMLAttributes } from "react"; import InfoBadge from "@components/ui/InfoBadge"; type Props = InputHTMLAttributes & { label?: React.ReactNode; description: string; descriptionAsLabel?: boolean; infomationIconText?: string; }; const CheckboxField = forwardRef( ({ label, description, infomationIconText, descriptionAsLabel, ...rest }, ref) => { return (
{label && !descriptionAsLabel && (
)} {label && descriptionAsLabel && (
{label}
)}
{!label || descriptionAsLabel ? ( ) : (

{description}

)}
{infomationIconText && }
); } ); CheckboxField.displayName = "CheckboxField"; export default CheckboxField;