feat: Génération d'une page de suivi pédagogique + fix utilisation

certains des composants
This commit is contained in:
N3WT DE COMPET
2025-05-04 15:45:28 +02:00
parent e9650c992e
commit 2a6b3bdf63
7 changed files with 194 additions and 98 deletions

View File

@ -6,11 +6,9 @@ const CheckBox = ({
handleChange,
fieldName,
itemLabelFunc = () => null,
labelAttenuated = () => false,
horizontal,
}) => {
const isChecked = formData[fieldName].includes(parseInt(item.id));
const isAttenuated = labelAttenuated(item) && !isChecked;
return (
<div
key={item.id}
@ -19,7 +17,7 @@ const CheckBox = ({
{horizontal && (
<label
htmlFor={`${fieldName}-${item.id}`}
className={`block text-sm text-center mb-1 ${isAttenuated ? 'text-gray-300' : 'font-bold text-emerald-600'}`}
className="block text-sm text-center mb-1 font-medium text-gray-700"
>
{itemLabelFunc(item)}
</label>
@ -37,7 +35,7 @@ const CheckBox = ({
{!horizontal && (
<label
htmlFor={`${fieldName}-${item.id}`}
className={`block text-sm ${isAttenuated ? 'text-gray-300' : 'font-bold text-emerald-600'}`}
className="block text-sm text-center mb-1 font-medium text-gray-700"
>
{itemLabelFunc(item)}
</label>