Skip to content

Commit 142eb66

Browse files
feat: add view (#70)
1 parent e5ce158 commit 142eb66

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

src/components/NavigationTree/NavigationTreeNode.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {FolderOpenIcon} from '../icons/FolderOpen';
1010
import {IndexIcon} from '../icons/Index';
1111
import {TableIcon} from '../icons/Table';
1212
import {TopicIcon} from '../icons/Topic';
13+
import {ViewIcon} from '../icons/View';
1314

1415
import {NavigationTreeActionType} from './state';
1516
import type {NavigationTreeAction} from './state';
@@ -50,6 +51,8 @@ function renderIcon(type: NavigationTreeNodeType | string, collapsed: boolean) {
5051
return <ExternalTableIcon height={16} />;
5152
case 'external_data_source':
5253
return <ExternalDataSourceIcon height={16} />;
54+
case 'view':
55+
return <ViewIcon height={16} />;
5356
default:
5457
return null;
5558
}

src/components/NavigationTree/__stories__/NavigationTree.stories.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ async function fetchPath(path: string) {
9999
name: 'external_data_source',
100100
type: 'external_data_source',
101101
},
102+
{
103+
name: 'view',
104+
type: 'view',
105+
},
102106
];
103107
}
104108

src/components/NavigationTree/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export type NavigationTreeNodeType =
1010
| 'topic'
1111
| 'stream'
1212
| 'external_table'
13-
| 'external_data_source';
13+
| 'external_data_source'
14+
| 'view';
1415

1516
export interface NavigationTreeDataItem {
1617
name: string;

src/components/icons/View.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React from 'react';
2+
3+
export function ViewIcon(props: React.SVGProps<SVGSVGElement>) {
4+
return (
5+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" {...props}>
6+
<path
7+
fillRule="evenodd"
8+
clipRule="evenodd"
9+
d="M1.625 2H7.49951C6.47457 2.77006 5.7552 3.92488 5.55588 5.25H1.625V7.6875H5.79193C6.48417 9.6186 8.33076 11 10.5 11C10.877 11 11.2443 10.9583 11.5974 10.8792L12.7748 12.5799C12.4905 13.0601 11.9665 13.375 11.375 13.375H1.625C0.710938 13.375 0 12.6641 0 11.75V3.625C0 2.73633 0.710938 2 1.625 2ZM1.625 11.75V9.3125H5.6875V11.75H1.625Z"
10+
/>
11+
<path
12+
fillRule="evenodd"
13+
clipRule="evenodd"
14+
d="M13.4411 8.71106C14.0985 7.9983 14.5 7.04604 14.5 6C14.5 3.79086 12.7091 2 10.5 2C8.29086 2 6.5 3.79086 6.5 6C6.5 8.20914 8.29086 10 10.5 10C11.0316 10 11.5389 9.89631 12.0029 9.70806L14.2807 12.9981C14.5557 13.3955 15.1008 13.4946 15.4981 13.2195C15.8955 12.9444 15.9946 12.3993 15.7195 12.002L13.4411 8.71106ZM12.5 6C12.5 7.10457 11.6046 8 10.5 8C9.39543 8 8.5 7.10457 8.5 6C8.5 4.89543 9.39543 4 10.5 4C11.6046 4 12.5 4.89543 12.5 6Z"
15+
/>
16+
</svg>
17+
);
18+
}

0 commit comments

Comments
 (0)