mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 16:03:21 +00:00
31 lines
1.3 KiB
JavaScript
31 lines
1.3 KiB
JavaScript
import React from 'react';
|
|
import TeacherLabel from '@/components/CustomLabels/TeacherLabel';
|
|
|
|
const ClassesInformation = ({ selectedClass, isPastYear }) => {
|
|
if (!selectedClass) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div className={`w-full p-6 shadow-lg rounded-full border relative ${isPastYear ? 'bg-gray-200 border-gray-600' : 'bg-emerald-200 border-emerald-500'}`}>
|
|
<div className={`border-b pb-4 ${isPastYear ? 'border-gray-600' : 'border-emerald-500'}`}>
|
|
<p className="text-gray-700 text-center"><strong>{selectedClass.age_range} ans</strong></p>
|
|
</div>
|
|
<div className={`border-b pb-4 ${isPastYear ? 'border-gray-600' : 'border-emerald-500'}`}>
|
|
<div className="flex flex-wrap justify-center space-x-4">
|
|
{selectedClass.teachers.map((teacher) => (
|
|
<div key={teacher.id} className="relative group mt-4">
|
|
<TeacherLabel nom={teacher.nom} prenom={teacher.prenom} />
|
|
<div className="absolute left-1/2 transform -translate-x-1/2 bottom-full mb-2 w-max px-4 py-2 text-white bg-gray-800 rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-300">
|
|
<p className="text-sm">{teacher.nom} {teacher.prenom}</p>
|
|
</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ClassesInformation;
|