1 import { TaxExclusive, TaxInclusive } from "@medusajs/icons"
2 import { Tooltip } from "@medusajs/ui"
3 import { useTranslation } from "react-i18next"
4
5 type IncludesTaxTooltipProps = {
6 includesTax?: boolean
7 }
8
9 export const IncludesTaxTooltip = ({
10 includesTax,
11 }: IncludesTaxTooltipProps) => {
12 const { t } = useTranslation()
13
14 return (
15 <Tooltip
16 maxWidth={999}
17 content={
18 includesTax
19 ? t("general.includesTaxTooltip")
20 : t("general.excludesTaxTooltip")
21 }
22 >
23 {includesTax ? (
24 <TaxInclusive className="text-ui-fg-muted shrink-0" />
25 ) : (
26 <TaxExclusive className="text-ui-fg-muted shrink-0" />
27 )}
28 </Tooltip>
29 )
30 }