Skip to content

Commit 3812ffc

Browse files
authored
chore(Dropdown): remove deprecated props (#8179)
* chore(Dropdown): remove deprecated props * chore(Dropdown): cleaning up lint comment
1 parent 102e06e commit 3812ffc

4 files changed

Lines changed: 1 addition & 17 deletions

File tree

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ export interface DropdownItemProps extends Omit<InternalDropdownItemProps, 'tabI
2727
isAriaDisabled?: boolean;
2828
/** Render dropdown item as non-interactive item */
2929
isPlainText?: boolean;
30-
/** @deprecated Forces display of the hover state of the element */
31-
isHovered?: boolean;
3230
/** Default hyperlink location */
3331
href?: string;
3432
/** Tooltip to display when hovered over the item */

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ export interface DropdownMenuProps {
1212
className?: string;
1313
/** Flag to indicate if menu is opened */
1414
isOpen?: boolean;
15-
/** @deprecated - no longer used */
16-
openedOnEnter?: boolean;
1715
/** Flag to indicate if the first dropdown item should gain initial focus, set false when adding
1816
* a specific auto-focus item (like a current selection) otherwise leave as true
1917
*/
@@ -51,7 +49,6 @@ export class DropdownMenu extends React.Component<DropdownMenuProps> {
5149
static defaultProps: DropdownMenuProps = {
5250
className: '',
5351
isOpen: true,
54-
openedOnEnter: false,
5552
autoFocus: true,
5653
position: DropdownPosition.left,
5754
component: 'ul',
@@ -179,8 +176,6 @@ export class DropdownMenu extends React.Component<DropdownMenuProps> {
179176
component,
180177
isGrouped,
181178
setMenuComponentRef,
182-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
183-
openedOnEnter,
184179
alignments,
185180
...props
186181
} = this.props;

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ export interface DropdownToggleProps extends React.HTMLProps<HTMLButtonElement>,
2929
isText?: boolean;
3030
/** Whether or not the <div> has a disabled state */
3131
isDisabled?: boolean;
32-
/** @deprecated Use `toggleVariant` instead. Whether or not the dropdown toggle button should have primary button styling */
33-
isPrimary?: boolean;
3432
/** Alternate styles for the dropdown toggle button */
3533
toggleVariant?: 'primary' | 'secondary' | 'default';
3634
/** An image to display within the dropdown toggle, appearing before any component children */
@@ -65,7 +63,6 @@ export const DropdownToggle: React.FunctionComponent<DropdownToggleProps> = ({
6563
isDisabled = false,
6664
isPlain = false,
6765
isText = false,
68-
isPrimary = false,
6966
toggleVariant = 'default',
7067
// eslint-disable-next-line @typescript-eslint/no-unused-vars
7168
isActive = false,
@@ -97,7 +94,6 @@ export const DropdownToggle: React.FunctionComponent<DropdownToggleProps> = ({
9794
isDisabled={isDisabled}
9895
isPlain={isPlain}
9996
isText={isText}
100-
isPrimary={isPrimary}
10197
toggleVariant={toggleVariant}
10298
onToggle={onToggle}
10399
aria-haspopup={ariaHasPopup}
@@ -123,7 +119,7 @@ export const DropdownToggle: React.FunctionComponent<DropdownToggleProps> = ({
123119
styles.dropdownToggle,
124120
styles.modifiers.splitButton,
125121
splitButtonVariant === 'action' && styles.modifiers.action,
126-
(toggleVariant === 'primary' || isPrimary) && splitButtonVariant === 'action' && styles.modifiers.primary,
122+
toggleVariant === 'primary' && splitButtonVariant === 'action' && styles.modifiers.primary,
127123
toggleVariant === 'secondary' && splitButtonVariant === 'action' && styles.modifiers.secondary,
128124
isDisabled && styles.modifiers.disabled
129125
)}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ export interface ToggleProps {
3535
isPlain?: boolean;
3636
/** Display the toggle in text only mode */
3737
isText?: boolean;
38-
/** @deprecated Use `toggleVariant` instead. Display the toggle with a primary button style */
39-
isPrimary?: boolean;
4038
/** Style the toggle as a child of a split button */
4139
isSplitButton?: boolean;
4240
/** Alternate styles for the dropdown toggle button */
@@ -64,7 +62,6 @@ export class Toggle extends React.Component<ToggleProps> {
6462
isDisabled: false,
6563
isPlain: false,
6664
isText: false,
67-
isPrimary: false,
6865
isSplitButton: false,
6966
onToggle: () => {},
7067
onEnter: () => {},
@@ -138,7 +135,6 @@ export class Toggle extends React.Component<ToggleProps> {
138135
isDisabled,
139136
isPlain,
140137
isText,
141-
isPrimary,
142138
isSplitButton,
143139
toggleVariant,
144140
onToggle,
@@ -166,7 +162,6 @@ export class Toggle extends React.Component<ToggleProps> {
166162
isActive && styles.modifiers.active,
167163
isPlain && styles.modifiers.plain,
168164
isText && styles.modifiers.text,
169-
isPrimary && styles.modifiers.primary,
170165
toggleVariant && buttonVariantStyles[toggleVariant],
171166
className
172167
)}

0 commit comments

Comments
 (0)