1 | import type React from 'react';
|
2 | import type { BadgeProps } from '../badge';
|
3 | import type { TooltipProps } from '../tooltip';
|
4 | import type BackTop from './BackTop';
|
5 | import type Group from './FloatButtonGroup';
|
6 | import type PurePanel from './PurePanel';
|
7 | export type FloatButtonElement = HTMLAnchorElement & HTMLButtonElement;
|
8 | export interface FloatButtonRef {
|
9 | nativeElement: FloatButtonElement | null;
|
10 | }
|
11 | export type FloatButtonType = 'default' | 'primary';
|
12 | export type FloatButtonShape = 'circle' | 'square';
|
13 | export type FloatButtonGroupTrigger = 'click' | 'hover';
|
14 | export type FloatButtonBadgeProps = Omit<BadgeProps, 'status' | 'text' | 'title' | 'children'>;
|
15 | export interface FloatButtonProps extends React.DOMAttributes<FloatButtonElement> {
|
16 | prefixCls?: string;
|
17 | className?: string;
|
18 | rootClassName?: string;
|
19 | style?: React.CSSProperties;
|
20 | icon?: React.ReactNode;
|
21 | description?: React.ReactNode;
|
22 | type?: FloatButtonType;
|
23 | shape?: FloatButtonShape;
|
24 | tooltip?: TooltipProps['title'];
|
25 | href?: string;
|
26 | target?: React.HTMLAttributeAnchorTarget;
|
27 | badge?: FloatButtonBadgeProps;
|
28 | ['aria-label']?: React.HtmlHTMLAttributes<HTMLElement>['aria-label'];
|
29 | }
|
30 | export interface FloatButtonContentProps extends React.DOMAttributes<HTMLDivElement> {
|
31 | className?: string;
|
32 | icon?: FloatButtonProps['icon'];
|
33 | description?: FloatButtonProps['description'];
|
34 | prefixCls: FloatButtonProps['prefixCls'];
|
35 | }
|
36 | export interface FloatButtonGroupProps extends FloatButtonProps {
|
37 | children: React.ReactNode;
|
38 | trigger?: FloatButtonGroupTrigger;
|
39 | open?: boolean;
|
40 | closeIcon?: React.ReactNode;
|
41 | onOpenChange?: (open: boolean) => void;
|
42 | }
|
43 | export interface BackTopProps extends Omit<FloatButtonProps, 'target'> {
|
44 | visibilityHeight?: number;
|
45 | onClick?: React.MouseEventHandler<FloatButtonElement>;
|
46 | target?: () => HTMLElement | Window | Document;
|
47 | prefixCls?: string;
|
48 | children?: React.ReactNode;
|
49 | className?: string;
|
50 | rootClassName?: string;
|
51 | style?: React.CSSProperties;
|
52 | duration?: number;
|
53 | }
|
54 | export type CompoundedComponent = React.ForwardRefExoticComponent<FloatButtonProps & React.RefAttributes<FloatButtonElement>> & {
|
55 | Group: typeof Group;
|
56 | BackTop: typeof BackTop;
|
57 | _InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
|
58 | };
|