type: fix type (#38697)

pull/38710/head
lijianan 2 years ago committed by GitHub
parent def5960164
commit a552a5eea5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,7 +11,7 @@ import { FloatButtonGroupProvider } from './context';
import type { FloatButtonGroupProps } from './interface'; import type { FloatButtonGroupProps } from './interface';
import useStyle from './style'; import useStyle from './style';
const FloatButtonGroup: React.FC<FloatButtonGroupProps> = props => { const FloatButtonGroup: React.FC<FloatButtonGroupProps> = (props) => {
const { const {
prefixCls: customizePrefixCls, prefixCls: customizePrefixCls,
className, className,
@ -41,14 +41,14 @@ const FloatButtonGroup: React.FC<FloatButtonGroupProps> = props => {
const [open, setOpen] = useMergedState(false, { value: props.open }); const [open, setOpen] = useMergedState(false, { value: props.open });
const clickAction = useRef<React.HTMLAttributes<HTMLDivElement>>({}); const clickAction = useRef<React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>>({});
const hoverAction = useRef<React.HTMLAttributes<HTMLDivElement>>({}); const hoverAction = useRef<React.HTMLAttributes<HTMLDivElement>>({});
if (trigger === 'click') { if (trigger === 'click') {
clickAction.current = { clickAction.current = {
onClick() { onClick() {
setOpen(prevState => { setOpen((prevState) => {
onOpenChange?.(!prevState); onOpenChange?.(!prevState);
return !prevState; return !prevState;
}); });

Loading…
Cancel
Save