Skip to content

Commit

Permalink
feat: added tool tip
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleryy committed Oct 9, 2024
1 parent 39700f6 commit b09a234
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions packages/web/src/components/ResultCard/ResultCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
VStack,
HStack,
Icon,
Tooltip,
} from "@chakra-ui/react";
import { InfoIcon, TimeIcon, CalendarIcon } from "@chakra-ui/icons";
import { FaMapMarkerAlt } from "react-icons/fa";
Expand Down Expand Up @@ -85,18 +86,22 @@ const ResultCard = React.memo(
{props.name}
</Text>
<HStack spacing={4}>
<Flex align="center">
<Icon as={CalendarIcon} color={accentColor} mr={1} />
<Text fontSize="sm" color="gray.500">
{formattedDate}
</Text>
</Flex>
<Flex align="center">
<Icon as={TimeIcon} color={accentColor} mr={1} />
<Text fontSize="sm" color="gray.500">
{props.itemdate}
</Text>
</Flex>
<Tooltip label="Date item was reported" placement="top">
<Flex align="center">
<Icon as={CalendarIcon} color={accentColor} mr={1} />
<Text fontSize="sm" color="gray.500">
{formattedDate}
</Text>
</Flex>
</Tooltip>
<Tooltip label="Time item was lost/found" placement="top">
<Flex align="center">
<Icon as={TimeIcon} color={accentColor} mr={1} />
<Text fontSize="sm" color="gray.500">
{props.itemdate}
</Text>
</Flex>
</Tooltip>
</HStack>
<Text fontSize="sm" color={textColor} noOfLines={2}>
{props.description}
Expand Down

0 comments on commit b09a234

Please sign in to comment.