@material-ui/lab#TimelineItem JavaScript Examples
The following examples show how to use
@material-ui/lab#TimelineItem.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AppOrderTimeline.js From course-manager with MIT License | 6 votes |
function OrderItem({ item, isLast }) {
const { type, title, time } = item;
return (
<TimelineItem>
<TimelineSeparator>
<TimelineDot
sx={{
bgcolor:
(type === 'order1' && 'primary.main') ||
(type === 'order2' && 'success.main') ||
(type === 'order3' && 'info.main') ||
(type === 'order4' && 'warning.main') ||
'error.main'
}}
/>
{isLast ? null : <TimelineConnector />}
</TimelineSeparator>
<TimelineContent>
<Typography variant="subtitle2">{title}</Typography>
<Typography variant="caption" sx={{ color: 'text.secondary' }}>
{fDateTime(time)}
</Typography>
</TimelineContent>
</TimelineItem>
);
}