Skip to content

Commit

Permalink
fix: 还原common.ts文件
Browse files Browse the repository at this point in the history
  • Loading branch information
04756 committed Aug 14, 2024
1 parent db0cef9 commit 37ecf01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ReactElement, ReactNode, CSSProperties, FormEvent, DragEvent, Synthetic
// TElement 表示 API 只接受传入组件
export type TElement<T = undefined> = T extends undefined ? ReactElement : (props: T) => ReactElement;
// 1. TNode = ReactNode; 2. TNode<T> = (props: T) => ReactNode
export type TNode<T = undefined> = T extends undefined ? ReactNode | (() => ReactNode) : ReactNode | ((props: T) => ReactNode);
export type TNode<T = undefined> = T extends undefined ? ReactNode : (props: T) => ReactNode;

export type AttachNodeReturnValue = HTMLElement | Element | Document;
export type AttachNode = CSSSelector | ((triggerNode?: HTMLElement) => AttachNodeReturnValue);
Expand Down
3 changes: 2 additions & 1 deletion src/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { CSSProperties, useCallback, useMemo } from 'react';
import React, { useCallback, useMemo } from 'react';
import type { CSSProperties } from 'react';
import { ChevronLeftIcon } from 'tdesign-icons-react';
import ClassNames from 'classnames';
import useConfig from '../_util/useConfig';
Expand Down

0 comments on commit 37ecf01

Please sign in to comment.