Skip to content

Commit c7a6857

Browse files
committed
feat: extract overside tabDataInterface
1 parent 3645f46 commit c7a6857

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/components/tabs/tab.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ import {
1616
} from 'mo/common/className';
1717
import TabDot from './tabDot';
1818

19-
export interface ITab {
19+
export interface TabData<T = any> {
20+
modified?: boolean;
21+
language?: string | undefined;
2022
path?: string;
23+
value?: string;
24+
}
25+
export interface ITab extends TabData{
2126
key?: string;
2227
name?: string;
23-
modified?: boolean;
24-
value?: string;
25-
language?: string | undefined;
26-
tip?: string | React.ReactNode;
2728
label?: React.ReactNode;
29+
tip?: string | React.ReactNode;
2830
renderPanel?: React.ReactNode;
2931
}
3032

src/typings/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ interface HTMLElementProps<T = any> {
1616
}
1717

1818
type LiteralUnion<T extends U, U> = T | (U & {});
19+

0 commit comments

Comments
 (0)