Add missing tooltips (#444)
This commit is contained in:
@@ -8,9 +8,10 @@
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import SearchIcon from '@mui/icons-material/Search';
|
||||
import { IconButton, Input } from '@mui/material';
|
||||
import { IconButton, Input, Tooltip } from '@mui/material';
|
||||
import CancelIcon from '@mui/icons-material/Cancel';
|
||||
import { useQueryParam, StringParam } from 'use-query-params';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface IProps {
|
||||
autoOpen?: boolean;
|
||||
@@ -21,6 +22,8 @@ const defaultProps = {
|
||||
};
|
||||
|
||||
export const AppbarSearch: React.FunctionComponent<IProps> = (props) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const { autoOpen } = props;
|
||||
const [query, setQuery] = useQueryParam('query', StringParam);
|
||||
const [searchOpen, setSearchOpen] = useState(!!query);
|
||||
@@ -83,9 +86,11 @@ export const AppbarSearch: React.FunctionComponent<IProps> = (props) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<IconButton onClick={openSearch}>
|
||||
<SearchIcon />
|
||||
</IconButton>
|
||||
<Tooltip title={t('search.title.search')}>
|
||||
<IconButton onClick={openSearch}>
|
||||
<SearchIcon />
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user