Skip to content

Commit

Permalink
fix(Popper): make with mergeStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
EldarMuhamethanov committed Dec 17, 2024
1 parent 5cad355 commit 80de259
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/vkui/src/components/Popper/Popper.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';

import * as React from 'react';
import { mergeStyle } from '../../helpers/mergeStyle';
import { useExternRef } from '../../hooks/useExternRef';
import {
autoUpdateFloatingElement,
Expand Down Expand Up @@ -161,13 +162,17 @@ export const Popper = ({
refs.setReference('current' in targetRef ? targetRef.current : targetRef);
}, [refs.setReference, targetRef]);

const dropdownStyle =
typeof zIndex !== 'undefined'
? {

Check warning on line 167 in packages/vkui/src/components/Popper/Popper.tsx

View check run for this annotation

Codecov / codecov/patch

packages/vkui/src/components/Popper/Popper.tsx#L167

Added line #L167 was not covered by tests
zIndex,
}
: undefined;

const dropdown = (
<RootComponent
{...restProps}
style={{
...style,
zIndex,
}}
style={mergeStyle(dropdownStyle, style)}
baseClassName={styles.host}
getRootRef={handleRootRef}
baseStyle={convertFloatingDataToReactCSSProperties(
Expand Down

0 comments on commit 80de259

Please sign in to comment.