mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
feat: Génération d'une page de suivi pédagogique + fix utilisation
certains des composants
This commit is contained in:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user