import { Avatar, Button, createTableColumn, Dropdown, Input, PresenceBadgeStatus, Select, Slider, Switch, TableCellLayout, TableColumnDefinition, Text, Tooltip } from '@fluentui/react-components'; import { AddCircle20Regular, Delete20Regular, DocumentPdfRegular, DocumentRegular, EditRegular, FolderRegular, OpenRegular, PeopleRegular, Save20Regular, VideoRegular } from '@fluentui/react-icons'; import React, {FC} from 'react'; import {Section} from './components/Section'; import {Labeled} from './components/Labeled'; import {ToolTipButton} from './components/ToolTipButton'; type FileCell = { label: string; icon: JSX.Element; }; type LastUpdatedCell = { label: string; timestamp: number; }; type LastUpdateCell = { label: string; icon: JSX.Element; }; type AuthorCell = { label: string; status: PresenceBadgeStatus; }; type Item = { file: FileCell; author: AuthorCell; lastUpdated: LastUpdatedCell; lastUpdate: LastUpdateCell; }; const items: Item[] = [ { file: {label: 'Meeting notes', icon: }, author: {label: 'Max Mustermann', status: 'available'}, lastUpdated: {label: '7h ago', timestamp: 1}, lastUpdate: { label: 'You edited this', icon: } }, { file: {label: 'Thursday presentation', icon: }, author: {label: 'Erika Mustermann', status: 'busy'}, lastUpdated: {label: 'Yesterday at 1:45 PM', timestamp: 2}, lastUpdate: { label: 'You recently opened this', icon: } }, { file: {label: 'Training recording', icon: }, author: {label: 'John Doe', status: 'away'}, lastUpdated: {label: 'Yesterday at 1:45 PM', timestamp: 2}, lastUpdate: { label: 'You recently opened this', icon: } }, { file: {label: 'Purchase order', icon: }, author: {label: 'Jane Doe', status: 'offline'}, lastUpdated: {label: 'Tue at 9:30 AM', timestamp: 3}, lastUpdate: { label: 'You shared this in a Teams chat', icon: } } ]; const columns: TableColumnDefinition[] = [ createTableColumn({ columnId: 'file', compare: (a, b) => { return a.file.label.localeCompare(b.file.label); }, renderHeaderCell: () => { return 'File'; }, renderCell: (item) => { return ( {item.file.label} ); } }), createTableColumn({ columnId: 'author', compare: (a, b) => { return a.author.label.localeCompare(b.author.label); }, renderHeaderCell: () => { return 'Author'; }, renderCell: (item) => { return ( } > {item.author.label} ); } }), createTableColumn({ columnId: 'lastUpdated', compare: (a, b) => { return a.lastUpdated.timestamp - b.lastUpdated.timestamp; }, renderHeaderCell: () => { return 'Last updated'; }, renderCell: (item) => { return item.lastUpdated.label; } }), createTableColumn({ columnId: 'lastUpdate', compare: (a, b) => { return a.lastUpdate.label.localeCompare(b.lastUpdate.label); }, renderHeaderCell: () => { return 'Last update'; }, renderCell: (item) => { return ( {item.lastUpdate.label} ); } }) ]; // // > // {({ item, rowId }) => ( // key={rowId}> // {({ renderCell }) => ( // {renderCell(item)} // )} // // )} // // export const Configs: FC = () => { return (
Configs
}/> }/> }/>
} />
}/> 1000
}/>
}/> }/>
}/> }/>
} />
}/> }/>
}/> }/>
} />
); };