Skip to content

Commit

Permalink
chore: update ts def
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Aug 4, 2022
1 parent a775f15 commit 8ce3db8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/TabNavList/OperationNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ export interface OperationNodeProps {
tabs: Tab[];
rtl: boolean;
tabBarGutter?: number;
activeKey: React.Key;
activeKey: string;
mobile: boolean;
moreIcon?: React.ReactNode;
moreTransitionName?: string;
editable?: EditableConfig;
locale?: TabsLocale;
removeAriaLabel?: string;
onTabClick: (key: React.Key, e: React.MouseEvent | React.KeyboardEvent) => void;
onTabClick: (key: string, e: React.MouseEvent | React.KeyboardEvent) => void;
tabMoving?: boolean;
getPopupContainer?: (node: HTMLElement) => HTMLElement;
popupClassName?: string;
Expand Down Expand Up @@ -59,7 +59,7 @@ function OperationNode(

const dropdownAriaLabel = locale?.dropdownAriaLabel;

function onRemoveTab(event: React.MouseEvent | React.KeyboardEvent, key: React.Key) {
function onRemoveTab(event: React.MouseEvent | React.KeyboardEvent, key: string) {
event.preventDefault();
event.stopPropagation();
editable.onEdit('remove', {
Expand Down
2 changes: 1 addition & 1 deletion src/TabNavList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface TabNavListProps {
className?: string;
style?: React.CSSProperties;
locale?: TabsLocale;
onTabClick: (activeKey: React.Key, e: React.MouseEvent | React.KeyboardEvent) => void;
onTabClick: (activeKey: string, e: React.MouseEvent | React.KeyboardEvent) => void;
onTabScroll?: OnTabScroll;
children?: (node: React.ReactElement) => React.ReactElement;
getPopupContainer?: (node: HTMLElement) => HTMLElement;
Expand Down
2 changes: 1 addition & 1 deletion src/TabPanelList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { TabPosition, AnimatedConfig } from '../interface';
import TabPane from './TabPane';

export interface TabPanelListProps {
activeKey: React.Key;
activeKey: string;
id: string;
rtl: boolean;
animated?: AnimatedConfig;
Expand Down
2 changes: 1 addition & 1 deletion src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface TabsLocale {
export interface EditableConfig {
onEdit: (
type: 'add' | 'remove',
info: { key?: React.Key; event: React.MouseEvent | React.KeyboardEvent },
info: { key?: string; event: React.MouseEvent | React.KeyboardEvent },
) => void;
showAdd?: boolean;
removeIcon?: React.ReactNode;
Expand Down

1 comment on commit 8ce3db8

@vercel
Copy link

@vercel vercel bot commented on 8ce3db8 Aug 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

tabs – ./

tabs-react-component.vercel.app
tabs-git-master-react-component.vercel.app

Please sign in to comment.