Skip to content

Commit

Permalink
adding tooltip for searchneu button (#761)
Browse files Browse the repository at this point in the history
* adding tooltip for searchneu button

* update icon used + remove padding that shifts tooltip
  • Loading branch information
KobeZ123 authored Nov 8, 2024
1 parent 6d77811 commit 57ef2f6
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions packages/frontend/components/AddCourseModal/SearchResult.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AddIcon, QuestionOutlineIcon } from "@chakra-ui/icons";
import { AddIcon, InfoOutlineIcon } from "@chakra-ui/icons";
import { Box, Flex, IconButton, Text } from "@chakra-ui/react";
import { NUPathEnum, ScheduleCourse2, SeasonEnum } from "@graduate/common";
import { getCourseDisplayString } from "../../utils/";
Expand Down Expand Up @@ -54,25 +54,28 @@ export const SearchResult: React.FC<SearchResultProps> = ({
</Text>
</Box>
<Box ml="auto" mr="sm"></Box>
<a
href={getSearchLink(year ?? 2022, season, course)}
target="_blank"
rel="noreferrer"
<GraduateToolTip
label={`Search for ${getCourseDisplayString(course)} on SearchNEU`}
>
<IconButton
aria-label="Add class"
icon={<QuestionOutlineIcon />}
color="primary.blue.light.main"
border={0}
colorScheme="primary.blue.light.main"
isRound
size="sm"
pr={1}
isLoading={isSelectingAnotherCourse}
isDisabled={isResultAlreadyAdded || isResultAlreadySelected}
alignSelf="center"
/>
</a>
<a
href={getSearchLink(year ?? 2022, season, course)}
target="_blank"
rel="noreferrer"
>
<IconButton
aria-label="Search course information"
icon={<InfoOutlineIcon />}
color="primary.blue.light.main"
border={0}
colorScheme="primary.blue.light.main"
isRound
size="md"
isLoading={isSelectingAnotherCourse}
isDisabled={isResultAlreadyAdded || isResultAlreadySelected}
alignSelf="center"
/>
</a>
</GraduateToolTip>
<NUPathLabel
nuPaths={course.nupaths ? course.nupaths : []}
filteredPaths={filteredPaths}
Expand Down

0 comments on commit 57ef2f6

Please sign in to comment.