Skip to content

Commit 3354002

Browse files
committed
🐛 fix(context-menu): remove entrance animation for instant appearance
1 parent c703592 commit 3354002

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/base-ui/ContextMenu/ContextMenuHost.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import {
1919
} from './store';
2020
import { styles } from './style';
2121

22+
const noAnimationStyles = { '--lobe-dropdown-animation-duration': '0ms' } as React.CSSProperties;
23+
2224
export const ContextMenuHost = memo(() => {
2325
const isClient = useIsClient();
2426
const appElement = useAppElement();
@@ -67,6 +69,7 @@ export const ContextMenuHost = memo(() => {
6769
anchor={state.anchor ?? undefined}
6870
className={styles.positioner}
6971
sideOffset={6}
72+
style={noAnimationStyles}
7073
>
7174
<ContextMenu.Popup
7275
className={styles.popup}

src/base-ui/ContextMenu/renderItems.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import {
2626
type RenderOptions,
2727
type SubMenuType,
2828
} from '@/Menu';
29+
import { styles } from '@/Menu/sharedStyle';
2930
import { preventDefaultAndStopPropagation } from '@/utils/dom';
3031

31-
import { styles } from './style';
3232
import {
3333
type ContextMenuCheckboxItem,
3434
type ContextMenuItem,

0 commit comments

Comments
 (0)