Skip to content

Commit fcd2e94

Browse files
author
Titani
committed
fix linting errors
1 parent 4295f74 commit fcd2e94

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export interface DrawerProps extends React.HTMLProps<HTMLDivElement> {
1818
}
1919

2020
export interface DrawerContextProps {
21-
isExpanded: boolean
22-
};
21+
isExpanded: boolean;
22+
}
2323

2424
export const DrawerContext = React.createContext<Partial<DrawerContextProps>>({
2525
isExpanded: false
@@ -34,15 +34,15 @@ export const Drawer: React.SFC<DrawerProps> = ({
3434
position = 'right',
3535
...props
3636
}: DrawerProps) => (
37-
<DrawerContext.Provider value ={{isExpanded}}>
37+
<DrawerContext.Provider value={{ isExpanded }}>
3838
<div
3939
className={css(
4040
styles.drawer,
4141
isExpanded && styles.modifiers.expanded,
4242
isInline && styles.modifiers.inline,
4343
isStatic && styles.modifiers.static,
4444
position === 'left' && styles.modifiers.panelLeft,
45-
className,
45+
className
4646
)}
4747
{...props}
4848
>

packages/react-core/src/components/Drawer/DrawerContent.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import styles from '@patternfly/react-styles/css/components/Drawer/drawer';
33
import { css } from '@patternfly/react-styles';
4-
import { DrawerMain } from './DrawerMain'
4+
import { DrawerMain } from './DrawerMain';
55

66
export interface DrawerContentProps extends React.HTMLProps<HTMLDivElement> {
77
/** Additional classes added to the Drawer. */
@@ -19,10 +19,10 @@ export const DrawerContent: React.SFC<DrawerContentProps> = ({
1919
panelContent,
2020
...props
2121
}: DrawerContentProps) => (
22-
<DrawerMain>
23-
<div className={css(styles.drawerContent)} {...props}>
24-
{children}
25-
</div>
26-
{panelContent}
27-
</DrawerMain>
22+
<DrawerMain>
23+
<div className={css(styles.drawerContent)} {...props}>
24+
{children}
25+
</div>
26+
{panelContent}
27+
</DrawerMain>
2828
);

packages/react-core/src/components/Drawer/DrawerPanelContent.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@ export const DrawerPanelContent: React.SFC<DrawerPanelContentProps> = ({
1919
...props
2020
}: DrawerPanelContentProps) => (
2121
<DrawerContext.Consumer>
22-
{({ isExpanded }) =>
23-
<div className={css(styles.drawerPanel, hasBorder && styles.modifiers.border, className)} hidden={!isExpanded} aria-hidden={!isExpanded} aria-expanded={isExpanded} {...props} >
22+
{({ isExpanded }) => (
23+
<div
24+
className={css(styles.drawerPanel, hasBorder && styles.modifiers.border, className)}
25+
hidden={!isExpanded}
26+
aria-hidden={!isExpanded}
27+
aria-expanded={isExpanded}
28+
{...props}
29+
>
2430
{children}
2531
</div>
26-
}
32+
)}
2733
</DrawerContext.Consumer>
2834
);

0 commit comments

Comments
 (0)