Remove default exports
[arvados-workbench2.git] / src / components / details-panel-factory / items / project-item.tsx
index 559816e12fc36e288c226bfe5bd01f55036b6e8c..702aa17b2f7996e72c94c15c3d8a8919a1d9de8b 100644 (file)
@@ -3,21 +3,23 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { IconTypes } from '../../icon/icon';
-import Attribute from '../../attribute/attribute';
-import AbstractItem from './abstract-item';
+import { ProjectIcon } from '../../icon/icon';
+import { Attribute } from '../../attribute/attribute';
+import { AbstractItem } from './abstract-item';
 import { ProjectResource } from '../../../models/project';
 import { formatDate } from '../../../common/formatters';
+import { ResourceKind } from '../../../models/resource';
+import { resourceLabel } from '../../../common/labels';
 
-export default class ProjectItem extends AbstractItem<ProjectResource> {
+export class ProjectItem extends AbstractItem<ProjectResource> {
 
-    getIcon(): IconTypes {
-        return IconTypes.FOLDER;
+    getIcon(className?: string) {
+        return <ProjectIcon className={className} />;
     }
 
-    buildDetails(): React.ReactElement<any> {
+    buildDetails() {
         return <div>
-            <Attribute label='Type' value={this.item.groupClass} />
+            <Attribute label='Type' value={resourceLabel(ResourceKind.Project)} />
             {/* Missing attr */}
             <Attribute label='Size' value='---' />
             <Attribute label='Owner' value={this.item.ownerUuid} />
@@ -28,4 +30,4 @@ export default class ProjectItem extends AbstractItem<ProjectResource> {
             <Attribute label='Description' value={this.item.description} />
         </div>;
     }
-}
\ No newline at end of file
+}