({ children }: { children: ReactNode })
| 10 | * sponsor page. |
| 11 | */ |
| 12 | export function SvgProOnlyPopover({ children }: { children: ReactNode }) { |
| 13 | const hasProAccess = useHasProAccess(); |
| 14 | if (hasProAccess) return <>{children}</>; |
| 15 | return ( |
| 16 | <HoverCard.Root> |
| 17 | <HoverCard.Trigger asChild>{children}</HoverCard.Trigger> |
| 18 | <HoverCard.Content className="no-bg"> |
| 19 | <div className="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-4 overflow-hidden"> |
| 20 | <p className="text-gray-800 dark:text-gray-100 text-sm"> |
| 21 | <Trans> |
| 22 | This feature is only available to pro users.{" "} |
| 23 | <a |
| 24 | href="/pricing" |
| 25 | data-to-pricing="SVG Pro Only Popover" |
| 26 | className="text-blue-500 hover:underline" |
| 27 | > |
| 28 | Become a pro user |
| 29 | </a>{" "} |
| 30 | to unlock it. |
| 31 | </Trans> |
| 32 | </p> |
| 33 | </div> |
| 34 | </HoverCard.Content> |
| 35 | </HoverCard.Root> |
| 36 | ); |
| 37 | } |
nothing calls this directly
no test coverage detected