Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / applications / calendar / src / app / containers / setup / CalendarTableRows.tsx
blob132765b047d796b5d9fd24827382f11ad102baa4
1 import { c } from 'ttag';
3 import { Table, TableBody, TableHeader, TableRow } from '@proton/components';
4 import type { VisualCalendar } from '@proton/shared/lib/interfaces/calendar';
6 import CalendarIcon from '../../components/CalendarIcon';
8 const CalendarTableRow = ({ Name, Color }: VisualCalendar) => {
9     return (
10         <TableRow
11             cells={[
12                 <div key={0} className="flex items-center flex-nowrap">
13                     <CalendarIcon color={Color} className="shrink-0 mr-4" />
14                     <span className="text-ellipsis" title={Name}>
15                         {Name}
16                     </span>
17                 </div>,
18             ]}
19         />
20     );
23 interface Props {
24     calendars: VisualCalendar[];
26 const CalendarTableRows = ({ calendars = [] }: Props) => {
27     return (
28         <Table>
29             <TableHeader cells={[c('Header').t`Name`]} />
30             <TableBody>
31                 {calendars.map((calendar) => {
32                     return <CalendarTableRow key={calendar.ID} {...calendar} />;
33                 })}
34             </TableBody>
35         </Table>
36     );
39 export default CalendarTableRows;