feat: add animate in trigger, resolved #529

This commit is contained in:
qishaoxuan
2022-07-25 19:10:02 +08:00
parent dd75c36a4a
commit a7c76c0bce
4 changed files with 65 additions and 38 deletions

View File

@@ -6,8 +6,6 @@ import React, {
useRef,
useState,
} from 'react';
import type { PropsWithChildren } from 'react';
import {
MuiPopper,
MuiClickAwayListener as ClickAwayListener,
@@ -18,7 +16,7 @@ import { styled } from '../styled';
import { PopperProps, PopperHandler, VirtualElement } from './interface';
import { useTheme } from '../theme';
import { PopperArrow } from './PopoverArrow';
export const Popper = forwardRef<PopperHandler, PropsWithChildren<PopperProps>>(
export const Popper = forwardRef<PopperHandler, PopperProps>(
(
{
children,

View File

@@ -17,6 +17,10 @@ export type PopperArrowProps = {
export type PopperProps = {
// Popover content
content: ReactNode;
// Popover trigger
children?: ReactNode;
// Position of Popover
placement?: PopperPlacementType;