Tabs.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import * as React from 'react';
  2. import type { GetIndicatorSize } from './hooks/useIndicator';
  3. import type { AnimatedConfig, EditableConfig, MoreProps, OnTabScroll, RenderTabBar, Tab, TabBarExtraContent, TabPosition, TabsLocale } from './interface';
  4. export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'children'> {
  5. prefixCls?: string;
  6. className?: string;
  7. style?: React.CSSProperties;
  8. id?: string;
  9. items?: Tab[];
  10. activeKey?: string;
  11. defaultActiveKey?: string;
  12. direction?: 'ltr' | 'rtl';
  13. animated?: boolean | AnimatedConfig;
  14. renderTabBar?: RenderTabBar;
  15. tabBarExtraContent?: TabBarExtraContent;
  16. tabBarGutter?: number;
  17. tabBarStyle?: React.CSSProperties;
  18. tabPosition?: TabPosition;
  19. destroyInactiveTabPane?: boolean;
  20. onChange?: (activeKey: string) => void;
  21. onTabClick?: (activeKey: string, e: React.KeyboardEvent | React.MouseEvent) => void;
  22. onTabScroll?: OnTabScroll;
  23. editable?: EditableConfig;
  24. getPopupContainer?: (node: HTMLElement) => HTMLElement;
  25. locale?: TabsLocale;
  26. more?: MoreProps;
  27. /** @private Internal usage. Not promise will rename in future */
  28. popupClassName?: string;
  29. indicator?: {
  30. size?: GetIndicatorSize;
  31. align?: 'start' | 'center' | 'end';
  32. };
  33. }
  34. declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
  35. export default Tabs;