Skip to content

Commit

Permalink
feat: add tooltip for bulk search option
Browse files Browse the repository at this point in the history
  • Loading branch information
katiestahl committed Mar 13, 2024
1 parent bf49e01 commit 89d9d3d
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions client/src/components/Shared/SearchBar/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
Select,
SelectChangeEvent,
TextField,
Tooltip,
} from '@mui/material';
import { useContext, useEffect } from 'react';
import React from 'react';
Expand All @@ -21,6 +22,7 @@ import { ActionTypes } from 'stores/Global/reducers';
import { useGetNameSuggestions } from 'hooks/queries/useGetNameSuggestions';
import { SearchTypes } from 'types/types';
import { useGetIsMobile } from 'hooks/shared/useGetIsMobile';
import HelpIcon from '@mui/icons-material/Help';

enum DelimiterTypes {
Comma = 'Comma',
Expand Down Expand Up @@ -199,13 +201,12 @@ const SearchBar: React.FC<SearchBarProps> = ({ handleSubmit }) => {
<Alert severity="info">
<AlertTitle>Verify your search terms</AlertTitle>
<p>
It looks like you pasted search terms, but we don't know what
delimiter to separate your terms by. We have defaulted to
comma-separated terms.
It looks like you pasted search terms. We have defaulted the
delimiter to comma-separated terms.
</p>
<p style={{ marginTop: '10px' }}>
If this is incorrect or you would like to use a different delimiter,
make sure to check the "Bulk search" option below and select a
make sure to check the Bulk search option below and select a
delimiter from the drop down.
</p>
</Alert>
Expand Down Expand Up @@ -288,12 +289,14 @@ const SearchBar: React.FC<SearchBarProps> = ({ handleSubmit }) => {
height="100px"
alignContent="center"
>
<FormControlLabel
checked={pastingFromDocument}
onChange={handleCheckboxSelect}
control={<Checkbox />}
label="Bulk search (I am pasting search terms from an external document)"
/>
<Tooltip title="Select this option if you are pasting terms from an external document">
<FormControlLabel
checked={pastingFromDocument}
onChange={handleCheckboxSelect}
control={<Checkbox />}
label="Bulk search"
/>
</Tooltip>
<Box
width={isMobile ? '100%' : '50%'}
display={pastingFromDocument ? '' : 'none'}
Expand Down

0 comments on commit 89d9d3d

Please sign in to comment.