Skip to content

Commit 5012b97

Browse files
authored
chore(ci): fix linting errors in Nav and Modal demo (patternfly#5015)
Signed-off-by: Boaz Shuster <[email protected]>
1 parent 5881577 commit 5012b97

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

packages/react-core/src/components/Nav/NavExpandable.tsx

+7-10
Original file line numberDiff line numberDiff line change
@@ -94,23 +94,23 @@ export class NavExpandable extends React.Component<NavExpandableProps, NavExpand
9494
};
9595

9696
render() {
97-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
9897
const {
99-
id,
10098
title,
10199
srText,
102100
children,
103101
className,
104102
isActive,
103+
ouiaId,
104+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
105105
groupId,
106+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
107+
id,
108+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
106109
isExpanded,
107-
onExpand,
108-
ouiaId,
109-
ouiaSafe,
110110
...props
111111
} = this.props;
112112

113-
const { expandedState } = this.state;
113+
const { expandedState, ouiaStateId } = this.state;
114114

115115
const onClick = () => {
116116
this.setState(prevState => ({ expandedState: !prevState.expandedState }));
@@ -127,10 +127,7 @@ export class NavExpandable extends React.Component<NavExpandableProps, NavExpand
127127
isActive && styles.modifiers.current,
128128
className
129129
)}
130-
{...getOUIAProps(
131-
NavExpandable.displayName,
132-
this.props.ouiaId !== undefined ? this.props.ouiaId : this.state.ouiaStateId
133-
)}
130+
{...getOUIAProps(NavExpandable.displayName, ouiaId !== undefined ? ouiaId : ouiaStateId)}
134131
onClick={(e: React.MouseEvent<HTMLLIElement, MouseEvent>) => this.handleToggle(e, context.onToggle)}
135132
{...props}
136133
>

packages/react-integration/demo-app-ts/src/components/demos/ModalDemo/ModalDemo.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import { Modal, ModalVariant, Button, Title, TitleSizes } from '@patternfly/react-core';
33
import WarningTriangleIcon from '@patternfly/react-icons/dist/js/icons/warning-triangle-icon';
4-
import ExclamationTriangleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon';
54

65
interface ModalDemoState {
76
isModalOpen: boolean;

0 commit comments

Comments
 (0)