Skip to content

Commit 722fb80

Browse files
orgrimarrvraravam
authored andcommitted
chore: add workspaceicon to workspaceitem
1 parent db275ea commit 722fb80

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/features/workspaces/components/WorkspaceItem.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { observer } from 'mobx-react';
44
import withStyles, { WithStylesProps } from 'react-jss';
55
import { noop } from 'lodash';
66
import Workspace from '../models/Workspace';
7+
import WorkspaceIcon from '../../../components/ui/WorkspaceIcon';
78

89
const styles = theme => ({
910
row: {
@@ -13,7 +14,10 @@ const styles = theme => ({
1314
background: theme.workspaces.settings.listItems.hoverBgColor,
1415
},
1516
},
16-
columnName: {},
17+
columnName: {
18+
width: '60px',
19+
borderCollapse: 'separate',
20+
},
1721
});
1822

1923
interface IProps extends WithStylesProps<typeof styles> {
@@ -28,6 +32,13 @@ class WorkspaceItem extends Component<IProps> {
2832

2933
return (
3034
<tr className={classes.row}>
35+
<td
36+
className={classes.columnName}
37+
onClick={() => onItemClick(workspace)}
38+
onKeyDown={noop}
39+
>
40+
<WorkspaceIcon name={workspace.name} icon={workspace.icon} />
41+
</td>
3142
<td onClick={() => onItemClick(workspace)} onKeyDown={noop}>
3243
{workspace.name}
3344
</td>

0 commit comments

Comments
 (0)