+export const ResourceRestore =
+ connect((state: RootState, props: { uuid: string, dispatch?: Dispatch<any> }) => {
+ const resource = getResource<TrashableResource>(props.uuid)(state.resources);
+ return { resource, dispatch: props.dispatch };
+ })((props: { resource?: TrashableResource, dispatch?: Dispatch<any> }) =>
+ <Tooltip title="Restore">
+ <IconButton style={{ padding: '0' }} onClick={() => {
+ if (props.resource && props.dispatch) {
+ props.dispatch(toggleTrashed(
+ props.resource.kind,
+ props.resource.uuid,
+ props.resource.ownerUuid,
+ props.resource.isTrashed
+ ));
+ }}}
+ >
+ <RestoreFromTrashIcon />
+ </IconButton>
+ </Tooltip>
+ );
+
+export const trashPanelColumns: DataColumns<string> = [