Skip to content

Commit f7e8a65

Browse files
committed
lint run
ran prettier on components/Dropdown.js
1 parent 31749a4 commit f7e8a65

File tree

3 files changed

+197
-180
lines changed

3 files changed

+197
-180
lines changed

src/components/Dropdown.js

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@ import { DropdownArrow } from './DropdownArrow';
55
import Grid from '@material-ui/core/Grid';
66
import clsx from 'clsx';
77

8-
const useStyles = makeStyles(theme => ({
9-
8+
const useStyles = makeStyles((theme) => ({
109
dropdown: {
1110
margin: '24px auto',
1211
display: 'flex',
1312
alignItems: 'center',
1413
backgroundColor: theme.palette.background.default,
1514
boxSizing: 'border-box',
1615
border: '1px solid',
17-
borderColor:theme.palette.outline.gray,
16+
borderColor: theme.palette.outline.gray,
1817
borderRadius: '6px',
19-
height:'80px',
20-
padding:'12px 16px',
18+
height: '80px',
19+
padding: '12px 16px',
2120
[theme.breakpoints.down('sm')]: {
2221
height: '49px',
2322
},
@@ -30,7 +29,7 @@ const useStyles = makeStyles(theme => ({
3029
height: '49px',
3130
},
3231
},
33-
flexGrid:{
32+
flexGrid: {
3433
flexGrow: 1,
3534
justifyContent: 'flex-end',
3635
},
@@ -54,38 +53,56 @@ export const Dropdown = ({
5453
setColor(!colorStyle);
5554
};
5655

57-
58-
useEffect(()=>{
56+
useEffect(() => {
5957
setOpenChild(isOpen);
6058
setColor(isOpen);
61-
},[isOpen])
62-
59+
}, [isOpen]);
6360

6461
return (
65-
6662
<Grid data-cy='thumbnail-dropdown'>
6763
{dropdownLength > 0 ? (
68-
<Grid item xs={10} className={clsx(classes.dropdown, { [classes.open]: colorStyle === true })} >
64+
<Grid
65+
item
66+
xs={10}
67+
className={clsx(classes.dropdown, {
68+
[classes.open]: colorStyle === true,
69+
})}
70+
>
6971
<Grid>
70-
<ContributorThumbnail organization={organization} filtersActive={filtersActive} checkboxValue={checkboxValue} dropdownLength={dropdownLength} isOpen={colorStyle} isChildThumbnail={false}/>
72+
<ContributorThumbnail
73+
organization={organization}
74+
filtersActive={filtersActive}
75+
checkboxValue={checkboxValue}
76+
dropdownLength={dropdownLength}
77+
isOpen={colorStyle}
78+
isChildThumbnail={false}
79+
/>
7180
</Grid>
7281
<Grid className={classes.flexGrid}></Grid>
73-
<Grid item container className={classes.flexGrid} onClick={handleOpen}>
74-
<DropdownArrow open={openChild} setOpenFunction={setOpenChild} handleArrow={handleOpen} />
82+
<Grid
83+
item
84+
container
85+
className={classes.flexGrid}
86+
onClick={handleOpen}
87+
>
88+
<DropdownArrow
89+
open={openChild}
90+
setOpenFunction={setOpenChild}
91+
handleArrow={handleOpen}
92+
/>
7593
</Grid>
7694
</Grid>
77-
)
78-
79-
:
95+
) : (
8096
<Grid item xs={10} className={classes.dropdown}>
81-
<ContributorThumbnail organization={organization} checkboxValue={checkboxValue} isChildThumbnail={false}/>
97+
<ContributorThumbnail
98+
organization={organization}
99+
checkboxValue={checkboxValue}
100+
isChildThumbnail={false}
101+
/>
82102
</Grid>
83-
84-
}
103+
)}
85104
{openChild && children}
86-
87105
</Grid>
88-
89106
);
90107
};
91108
export default Dropdown;

src/components/common/Text.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ const Text = (props) => {
8787
classes={
8888
variant === 'body2'
8989
? {
90-
colorPrimary: classes.colorPrimary,
91-
colorSecondary: classes.colorSecondary,
92-
colorTextPrimary: classes.colorTextPrimary,
93-
colorTextSecondary: classes.colorTextSecondary,
94-
}
90+
colorPrimary: classes.colorPrimary,
91+
colorSecondary: classes.colorSecondary,
92+
colorTextPrimary: classes.colorTextPrimary,
93+
colorTextSecondary: classes.colorTextSecondary,
94+
}
9595
: {}
9696
}
9797
className={isCustom ? clsx(classes[variant], className) : className}

0 commit comments

Comments
 (0)