Files
github-stats-extended/apps/frontend/src/components/Home/CheckboxSection.jsx
T
Marco Pasqualetti 58e02dae29 feat: replace create-react-app with vite (#34)
* feat: replace `create-react-app` with `vite`

* fix: correct axios-override extension

* chore: add more extensions to lint-staged
2026-01-25 12:20:17 +01:00

42 lines
856 B
React

import React from "react";
import PropTypes from "prop-types";
import { Section } from "./Section";
import { Checkbox } from "../Generic/Checkbox";
const CheckboxSection = ({
title,
text,
question,
variable,
setVariable,
disabled,
}) => {
return (
<Section title={title}>
{text && <p dangerouslySetInnerHTML={{ __html: text }} />}
<Checkbox
question={question}
variable={variable}
setVariable={setVariable}
disabled={disabled}
/>
</Section>
);
};
CheckboxSection.propTypes = {
title: PropTypes.string.isRequired,
text: PropTypes.string,
question: PropTypes.string.isRequired,
variable: PropTypes.bool.isRequired,
setVariable: PropTypes.func.isRequired,
disabled: PropTypes.bool,
};
CheckboxSection.defaultProps = {
disabled: false,
};
export { CheckboxSection };