Files
github-stats-extended/apps/frontend/src/components/Home/CheckboxSection.tsx
T
Marco Pasqualetti 24907643ac feat(frontend): convert to ts (#37)
* feat(frontend): convert to ts

* refactor(frontend): axios-override - simplify shouldMock type

* fix: refine stage labels

* refactor(frontend): refine `useUserId` signature

* fix(frontend): descriptionLines and langsCount can be undefined

* refactor(frontend): refine casting on redirectCode

* refactor(frontend): refine stageIndex title and types

* refactor(frontend): apply pr review comments changes

* refactor(frontend): group properties using reference groups

* refactor(frontend): remove outdated comment

* fix(frontend): mock-http - simplify code
2026-01-29 09:42:25 +01:00

36 lines
692 B
TypeScript

import { Section } from "./Section";
import { Checkbox } from "../Generic/Checkbox";
import type { JSX } from "react";
interface CheckboxSectionProps {
title: string;
question: string;
checked: boolean;
text?: string;
disabled?: boolean;
onCheckedChange: (check: boolean) => void;
}
export function CheckboxSection({
title,
text,
question,
checked,
onCheckedChange,
disabled = false,
}: CheckboxSectionProps): JSX.Element {
return (
<Section title={title}>
{text && <p>{text}</p>}
<Checkbox
question={question}
checked={checked}
onCheckedChange={onCheckedChange}
disabled={disabled}
/>
</Section>
);
}