-const renderItemActions = () =>
- <Grid container justify="flex-end">
- <Popover triggerComponent={ItemActionsTrigger}>
- <List dense>
- {[{
- icon: "fas fa-users",
- label: "Share"
- },
- {
- icon: "fas fa-sign-out-alt",
- label: "Move to"
- },
- {
- icon: "fas fa-star",
- label: "Add to favourite"
- },
- {
- icon: "fas fa-edit",
- label: "Rename"
- },
- {
- icon: "fas fa-copy",
- label: "Make a copy"
- },
- {
- icon: "fas fa-download",
- label: "Download"
- }].map(renderAction)}
- < Divider />
- {renderAction({ icon: "fas fa-trash-alt", label: "Remove" })}
- </List>
- </Popover>
- </Grid>;
-
-const renderAction = (action: { label: string, icon: string }, index?: number) =>
- <ListItem button key={index}>
- <ListItemIcon>
- <i className={action.icon} />
- </ListItemIcon>
- <ListItemText>
- {action.label}
- </ListItemText>
- </ListItem>;
-
-const ItemActionsTrigger: React.SFC<IconButtonProps> = (props) =>
- <IconButton {...props}>
- <MoreVertIcon />
- </IconButton>;
-