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