11import React from 'react' ;
22
33import { TreeView } from '../TreeView/TreeView' ;
4- import { AsyncReplicationIcon } from '../icons/AsyncReplication' ;
5- import { ColumnTableIcon } from '../icons/ColumnTable' ;
6- import { DatabaseIcon } from '../icons/Database' ;
7- import { ExternalDataSourceIcon } from '../icons/ExternalDataSource' ;
8- import { ExternalTableIcon } from '../icons/ExternalTable' ;
9- import { FolderIcon } from '../icons/Folder' ;
10- import { FolderOpenIcon } from '../icons/FolderOpen' ;
11- import { IndexIcon } from '../icons/Index' ;
12- import { ResourcePoolIcon } from '../icons/ResourcePool' ;
13- import { TableIcon } from '../icons/Table' ;
14- import { TopicIcon } from '../icons/Topic' ;
15- import { TransferIcon } from '../icons/Transfer' ;
16- import { ViewIcon } from '../icons/View' ;
4+ import {
5+ AsyncReplicationIcon ,
6+ ColumnTableIcon ,
7+ DatabaseIcon ,
8+ ExternalDataSourceIcon ,
9+ ExternalTableIcon ,
10+ FolderIcon ,
11+ FolderOpenIcon ,
12+ ResourcePoolIcon ,
13+ TableIcon ,
14+ TableIndexIcon ,
15+ TopicIcon ,
16+ TransferIcon ,
17+ ViewIcon ,
18+ } from '../icons' ;
1719
1820import { NavigationTreeActionType } from './state' ;
1921import type { NavigationTreeAction } from './state' ;
@@ -37,33 +39,32 @@ export interface NavigationTreeNodeProps {
3739function renderIcon ( type : NavigationTreeNodeType , collapsed : boolean ) {
3840 switch ( type ) {
3941 case 'async_replication' :
40- return < AsyncReplicationIcon height = { 16 } /> ;
42+ return < AsyncReplicationIcon /> ;
4143 case 'transfer' :
42- return < TransferIcon height = { 16 } /> ;
44+ return < TransferIcon /> ;
4345 case 'database' :
44- // this icon is larger than the others, therefore 14 for a better fit
45- return < DatabaseIcon height = { 14 } /> ;
46+ return < DatabaseIcon /> ;
4647 case 'directory' :
47- return collapsed ? < FolderIcon height = { 16 } /> : < FolderOpenIcon height = { 16 } /> ;
48+ return collapsed ? < FolderIcon /> : < FolderOpenIcon /> ;
4849 case 'index' :
49- return < IndexIcon height = { 16 } /> ;
50+ return < TableIndexIcon /> ;
5051 case 'table' :
5152 case 'index_table' :
5253 case 'system_table' :
53- return < TableIcon height = { 16 } /> ;
54+ return < TableIcon /> ;
5455 case 'column_table' :
55- return < ColumnTableIcon height = { 16 } /> ;
56+ return < ColumnTableIcon /> ;
5657 case 'stream' :
5758 case 'topic' :
58- return < TopicIcon height = { 16 } /> ;
59+ return < TopicIcon /> ;
5960 case 'external_table' :
60- return < ExternalTableIcon height = { 16 } /> ;
61+ return < ExternalTableIcon /> ;
6162 case 'external_data_source' :
62- return < ExternalDataSourceIcon height = { 16 } /> ;
63+ return < ExternalDataSourceIcon /> ;
6364 case 'view' :
64- return < ViewIcon height = { 16 } /> ;
65+ return < ViewIcon /> ;
6566 case 'resource_pool' :
66- return < ResourcePoolIcon height = { 16 } /> ;
67+ return < ResourcePoolIcon /> ;
6768 default :
6869 return null ;
6970 }
0 commit comments