pl-fe: improve dropdown menu animation

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-09-14 14:18:19 +02:00
parent affbe86081
commit 6b7082f8fe

View file

@ -364,7 +364,6 @@ const DropdownMenu = (props: IDropdownMenu) => {
<Portal> <Portal>
<div <div
data-testid='dropdown-menu' data-testid='dropdown-menu'
className={getClassName()}
ref={refs.setFloating} ref={refs.setFloating}
style={{ style={{
position: strategy, position: strategy,
@ -372,14 +371,16 @@ const DropdownMenu = (props: IDropdownMenu) => {
left: x ?? 0, left: x ?? 0,
}} }}
> >
<DropdownMenuContent handleClose={handleClose} items={items} component={component} /> <div className={getClassName()}>
<DropdownMenuContent handleClose={handleClose} items={items} component={component} />
{/* Arrow */} {/* Arrow */}
<div <div
ref={arrowRef} ref={arrowRef}
style={arrowProps} style={arrowProps}
className='pointer-events-none absolute z-[-1] h-3 w-3 bg-white black:bg-black dark:bg-gray-900' className='pointer-events-none absolute z-[-1] h-3 w-3 bg-white black:bg-black dark:bg-gray-900'
/> />
</div>
</div> </div>
</Portal> </Portal>
) : null} ) : null}