import { Checkbox } from '@vegaprotocol/ui-toolkit'; import { t } from '@vegaprotocol/i18n'; import { useTelemetryApproval } from '../../lib/hooks/use-telemetry-approval'; export const TelemetryApproval = ({ helpText }: { helpText: string }) => { const [isApproved, setIsApproved] = useTelemetryApproval(); return (
{t('Share usage data')}} checked={isApproved} name="telemetry-approval" onCheckedChange={() => setIsApproved(!isApproved)} />
{helpText}
); };