Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

add tooltip support

Jonathan Summers-Muir6784db086790
diff --git a/www/components/PricingTableRow.tsx b/www/components/PricingTableRow.tsx
index bd7c89dc592..8c5bfaa7a91 100644
--- a/www/components/PricingTableRow.tsx
+++ b/www/components/PricingTableRow.tsx
@@ -1,4 +1,7 @@
-import { Space, Typography } from '@supabase/ui'
+import React from 'react'
+import ReactDOM from 'react-dom'
+import { IconHelpCircle, IconWatch, Space, Typography } from '@supabase/ui'
+import ReactTooltip from 'react-tooltip'
const Chevron = (props: any) => (
<>
@@ -78,10 +81,18 @@ export const PricingTableRowDesktop = (props: any) => {
return (
<tr className="divide-x dark:divide-gray-600">
<th
- className="py-5 px-6 text-sm font-normal text-gray-500 dark:text-gray-300 text-left"
+ className="flex items-center py-5 px-6 text-sm font-normal text-gray-500 dark:text-gray-300 text-left"
scope="row"
>
- {feat.title}
+ <span>{feat.title} </span>
+ {feat.tooltip && (
+ <span
+ className="ml-2 cursor-pointer hover:text-gray-800 dark:hover:text-white"
+ data-tip={feat.tooltip}
+ >
+ <IconHelpCircle size="small" />
+ </span>
+ )}
</th>
{Object.values(feat.tiers).map((tier) => {
@@ -100,6 +111,7 @@ export const PricingTableRowDesktop = (props: any) => {
</tr>
)
})}
+ <ReactTooltip effect={'solid'} />
</>
)
}
@@ -149,7 +161,9 @@ export const PricingTableRowMobile = (props: any) => {
return (
<tr className="border-t border-gray-200 dark:border-gray-600 ">
<th className="py-5 px-4 text-sm font-normal text-gray-500 text-left" scope="row">
- <Typography.Text type="secondary">{feat.title}</Typography.Text>
+ <span>
+ <Typography.Text type="secondary">{feat.title}</Typography.Text>
+ </span>
</th>
<td className="py-5 pr-4 text-right">
{typeof feat.tiers[tier] === 'boolean' && feat.tiers[tier] === true ? (
@@ -171,6 +185,7 @@ export const PricingTableRowMobile = (props: any) => {
})}
</tbody>
</table>
+ <ReactTooltip effect={'solid'} />
</>
)
}
diff --git a/www/data/Pricing.json b/www/data/Pricing.json
index f792f30e33c..008c76f93a5 100644
--- a/www/data/Pricing.json
+++ b/www/data/Pricing.json
@@ -45,6 +45,7 @@
},
{
"title": "Automatic backups",
+ "tooltip": "Backups are entire copies of your database that can be restored in the future.",
"tiers": {
"free": false,
"pro": "7 days of backup",
diff --git a/www/package-lock.json b/www/package-lock.json
index 1e8b41468e1..9013ab77fcf 100644
--- a/www/package-lock.json
+++ b/www/package-lock.json
@@ -5989,6 +5989,22 @@
"refractor": "^3.2.0"
}
},
+ "react-tooltip": {
+ "version": "4.2.17",
+ "resolved": "https://registry.npmjs.org/react-tooltip/-/react-tooltip-4.2.17.tgz",
+ "integrity": "sha512-LzwUbQYzeRyrjbuuCbYUB0dlJpFPGPwigWS052umr1QulcF5N4czabDiWJ+Y585Q7ijvMFuBbeOvnI/azoTusw==",
+ "requires": {
+ "prop-types": "^15.7.2",
+ "uuid": "^7.0.3"
+ },
+ "dependencies": {
+ "uuid": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz",
+ "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg=="
+ }
+ }
+ },
"react-transition-group": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.1.tgz",
diff --git a/www/package.json b/www/package.json
index d7781507dd8..8660edd913f 100644
--- a/www/package.json
+++ b/www/package.json
@@ -29,6 +29,7 @@
"react-ga": "^3.3.0",
"react-markdown": "^5.0.3",
"react-syntax-highlighter": "^15.3.1",
+ "react-tooltip": "^4.2.17",
"react-transition-group": "^4.4.1",
"rehype-slug": "^4.0.1",
"remark": "^13.0.0",