Skip to content

Commit

Permalink
bug fixed, tooltip added (#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
besizzo authored Apr 1, 2022
1 parent c568cde commit a52747f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/locales/uk/parts/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const admin = {
close: 'Закрити',
selectedImportantMaterials: 'Зараз використовуються:',
selectOption: `Оберіть об'єкт налаштування у меню`,
resetTableFilters: `Скинути всі фільтри`,
searchTitlePlaceholder: `Пошук по назві`,
searchAuthorPlaceholder: `Пошук по автору`,
};
17 changes: 13 additions & 4 deletions src/views/Profile/AdminTable/AdminTableFilters.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useSelector } from 'react-redux';
import { Grid, IconButton } from '@material-ui/core';
import { Grid, IconButton, Tooltip } from '@material-ui/core';
import HighlightOffRoundedIcon from '@material-ui/icons/HighlightOffRounded';
import i18, { langTokens } from '../../../locales/localizationInit';
import { QueryTypeEnum } from '../../../old/lib/types';
Expand Down Expand Up @@ -45,9 +45,18 @@ const AdminTableFilters: React.FC = () => {
return (
<Grid className={classes.filterSection} container direction="row">
<Grid item>
<IconButton onClick={resetFilters} className={classes.clearButton}>
<HighlightOffRoundedIcon fontSize="large" />
</IconButton>
<Tooltip
title="Скинути всі фільтри"
placement="bottom"
classes={{ tooltip: classes.tooltip }}
>
<IconButton
onClick={resetFilters}
className={classes.clearButton}
>
<HighlightOffRoundedIcon fontSize="large" />
</IconButton>
</Tooltip>
</Grid>
<Grid item>
<AdminFilter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ export const useStyles = makeStyles((theme: Theme) => ({
color: theme.palette.action.hover,
},
},
tooltip: {
backgroundColor: theme.palette.common.black,
...theme.typography.button,
},
}));

0 comments on commit a52747f

Please sign in to comment.