Skip to content

Commit f458df2

Browse files
committed
feat: deprecate derivative PopperProps and prefer PopperOptions
1 parent 3607bb6 commit f458df2

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

packages/react-core/src/components/Dropdown/Dropdown.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Menu, MenuContent, MenuProps } from '../Menu';
44
import { Popper, PopperOptions } from '../../helpers/Popper/Popper';
55
import { useOUIAProps, OUIAProps, onToggleArrowKeydownDefault } from '../../helpers';
66

7+
/** @deprecated Use PopperOptions instead */
78
export type DropdownPopperProps = PopperOptions;
89

910
export interface DropdownToggleProps {
@@ -49,7 +50,7 @@ export interface DropdownProps extends MenuProps, OUIAProps {
4950
/** z-index of the dropdown menu */
5051
zIndex?: number;
5152
/** Additional properties to pass to the Popper */
52-
popperProps?: DropdownPopperProps;
53+
popperProps?: PopperOptions;
5354
/** Height of the dropdown menu */
5455
menuHeight?: string;
5556
/** Maximum height of dropdown menu */

packages/react-core/src/components/Menu/MenuContainer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useEffect, useRef } from 'react';
22
import { onToggleArrowKeydownDefault, Popper } from '../../helpers';
33
import type { PopperOptions } from '../../helpers/Popper/Popper';
44

5+
/** @deprecated Use PopperOptions instead */
56
export type MenuPopperProps = PopperOptions;
67

78
export interface MenuContainerProps {
@@ -25,7 +26,7 @@ export interface MenuContainerProps {
2526
/** z-index of the dropdown menu */
2627
zIndex?: number;
2728
/** Additional properties to pass to the Popper */
28-
popperProps?: MenuPopperProps;
29+
popperProps?: PopperOptions;
2930
/** @beta Flag indicating the first menu item should be focused after opening the dropdown. */
3031
shouldFocusFirstItemOnOpen?: boolean;
3132
/** Flag indicating if scroll on focus of the first menu item should occur. */

packages/react-core/src/components/Select/Select.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Menu, MenuContent, MenuProps } from '../Menu';
44
import { Popper, PopperOptions } from '../../helpers/Popper/Popper';
55
import { getOUIAProps, OUIAProps, getDefaultOUIAId, onToggleArrowKeydownDefault } from '../../helpers';
66

7+
/** @deprecated Use PopperOptions instead */
78
export type SelectPopperProps = PopperOptions;
89

910
export interface SelectToggleProps {
@@ -52,7 +53,7 @@ export interface SelectProps extends MenuProps, OUIAProps {
5253
/** Determines the accessible role of the select. For a checkbox select pass in "menu". */
5354
role?: string;
5455
/** Additional properties to pass to the popper */
55-
popperProps?: SelectPopperProps;
56+
popperProps?: PopperOptions;
5657
/** Height of the select menu */
5758
menuHeight?: string;
5859
/** Maximum height of select menu */

packages/react-core/src/components/Tabs/OverflowTab.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { TabsContext } from './TabsContext';
88
import { TabProps } from './Tab';
99
import { TabTitleText } from './TabTitleText';
1010

11+
/** @deprecated Use PopperOptions instead */
1112
export type HorizontalOverflowPopperProps = PopperOptions;
1213

1314
export interface OverflowTabProps extends React.HTMLProps<HTMLLIElement> {
@@ -28,7 +29,7 @@ export interface OverflowTabProps extends React.HTMLProps<HTMLLIElement> {
2829
/** Time in ms to wait before firing the toggles' focus event. Defaults to 0 */
2930
focusTimeoutDelay?: number;
3031
/** Additional props to spread to the popper menu. */
31-
popperProps?: HorizontalOverflowPopperProps;
32+
popperProps?: PopperOptions;
3233
}
3334

3435
export const OverflowTab: React.FunctionComponent<OverflowTabProps> = ({

0 commit comments

Comments
 (0)