The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Move icons to own file
Terry Suttonbd0618372588
diff --git a/apps/www/components/Pricing/ComputePricingModal.tsx b/apps/www/components/Pricing/ComputePricingModal.tsxindex e7753983ce4..f3e7dde3782 100644--- a/apps/www/components/Pricing/ComputePricingModal.tsx+++ b/apps/www/components/Pricing/ComputePricingModal.tsx@@ -3,6 +3,7 @@ import { useRouter } from 'next/router'import { useTheme } from 'common/Providers'import { IconCheckCircle, IconXCircle, Modal } from 'ui'import pricingAddOn from '~/data/PricingAddOnTable.json'+import { IconPricingIncludedCheck, IconPricingMinus } from './PricingIcons'interface Props {showComputeModal: booleansetShowComputeModal: React.Dispatch<React.SetStateAction<boolean>>@@ -89,16 +90,13 @@ export default function ComputePricingModal({ showComputeModal, setShowComputeMo].join(' ')}>{row.columns.map((column) => (- <td- key={column.key}- className={`p-3 ${column.key === 'dedicated' ? 'hay' : 'nope'}`}- >+ <td key={column.key} className="p-3">{column.key === 'dedicated' ? (- <IconCheckCircle- size={14}- strokeWidth={2}- className={column.value ? 'text-brand-1000' : 'text-scale-700'}- />+ column.value ? (+ <IconPricingIncludedCheck tier="Pro tier" />+ ) : (+ <IconPricingMinus tier="Free tier" />+ )) : (column.value)}diff --git a/apps/www/components/Pricing/PricingIcons.tsx b/apps/www/components/Pricing/PricingIcons.tsxnew file mode 100644index 00000000000..5dd4c804921--- /dev/null+++ b/apps/www/components/Pricing/PricingIcons.tsx@@ -0,0 +1,57 @@+export const Check = () => (+ <svg className="-ml-0.5" xmlns="http://www.w3.org/2000/svg" width="24" height="25" fill="none">+ <path+ fill="#3ECF8E"+ fillRule="evenodd"+ d="M12 21.212a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-.708-6.414 4.463-4.463-.707-.708-4.11 4.11-1.986-1.986-.707.707 2.34 2.34h.707Z"+ clipRule="evenodd"+ />+ </svg>+)++export const IconPricingIncludedCheck = (props: any) => (+ <span className="mx-auto">+ <Check />+ <span className="sr-only">Included in {props.tier}</span>+ </span>+)++export const IconPricingMinus = (props: any) => (+ <>+ <svg+ xmlns="http://www.w3.org/2000/svg"+ width="18"+ height="18"+ fill="none"+ className="text-scale-700"+ >+ <path+ fill="currentColor"+ fillRule="evenodd"+ d="M9 18A9 9 0 1 0 9 0a9 9 0 0 0 0 18ZM5.534 9.534h6.804v-1H5.534v1Z"+ clipRule="evenodd"+ />+ </svg>+ <span className="sr-only">Not included in {props.tier}</span>+ </>+)++export const IconPricingInfo = () => (+ <>+ <svg+ className="text-scale-900 -ml-0.5"+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ fill="none"+ >+ <path+ fill="currentColor"+ fillRule="evenodd"+ d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm.724-11.97c0 .463-.328.764-.774.764-.436 0-.773-.3-.773-.764s.337-.783.774-.783c.445 0 .773.319.773.783Zm1.455 6.194H9.877v-.855h1.628v-2.956H9.877v-.828h2.674v3.784h1.628v.855Z"+ clipRule="evenodd"+ />+ </svg>+ <span className="sr-only">Info</span>+ </>+)diff --git a/apps/www/components/Pricing/PricingTableRow.tsx b/apps/www/components/Pricing/PricingTableRow.tsxindex fb44f3a0baa..3aaacc55236 100644--- a/apps/www/components/Pricing/PricingTableRow.tsx+++ b/apps/www/components/Pricing/PricingTableRow.tsx@@ -2,64 +2,7 @@ import { IconHelpCircle } from 'ui'import ProductIcon from 'components/ProductIcon'import React, { Fragment } from 'react'import ReactTooltip from 'react-tooltip'--export const Check = () => (- <svg className="-ml-0.5" xmlns="http://www.w3.org/2000/svg" width="24" height="25" fill="none">- <path- fill="#3ECF8E"- fillRule="evenodd"- d="M12 21.212a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm-.708-6.414 4.463-4.463-.707-.708-4.11 4.11-1.986-1.986-.707.707 2.34 2.34h.707Z"- clipRule="evenodd"- />- </svg>-)--const IncludedCheck = (props: any) => (- <span className="mx-auto">- <Check />- <span className="sr-only">Included in {props.tier}</span>- </span>-)--const Minus = (props: any) => (- <>- <svg- xmlns="http://www.w3.org/2000/svg"- width="18"- height="18"- fill="none"- className="text-scale-700"- >- <path- fill="currentColor"- fillRule="evenodd"- d="M9 18A9 9 0 1 0 9 0a9 9 0 0 0 0 18ZM5.534 9.534h6.804v-1H5.534v1Z"- clipRule="evenodd"- />- </svg>- <span className="sr-only">Not included in {props.tier}</span>- </>-)--const InfoIcon = () => (- <>- <svg- className="text-scale-900 -ml-0.5"- xmlns="http://www.w3.org/2000/svg"- width="24"- height="24"- fill="none"- >- <path- fill="currentColor"- fillRule="evenodd"- d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm.724-11.97c0 .463-.328.764-.774.764-.436 0-.773-.3-.773-.764s.337-.783.774-.783c.445 0 .773.319.773.783Zm1.455 6.194H9.877v-.855h1.628v-2.956H9.877v-.828h2.674v3.784h1.628v.855Z"- clipRule="evenodd"- />- </svg>- <span className="sr-only">Info</span>- </>-)+import { IconPricingIncludedCheck, IconPricingInfo, IconPricingMinus } from './PricingIcons'export const PricingTableRowDesktop = (props: any) => {const category = props.category@@ -117,10 +60,10 @@ export const PricingTableRowDesktop = (props: any) => {].join(' ')}>{typeof tierValue === 'boolean' && tierValue === true ? (- <IncludedCheck tier={tierValue} />+ <IconPricingIncludedCheck tier={tierValue} />) : typeof tierValue === 'boolean' && tierValue === false ? (<div className="text-scale-900">- <Minus tier={tierValue} />+ <IconPricingMinus tier={tierValue} /></div>) : (<span className="text-scale-1200 text-xs dark:text-white flex items-center gap-3">@@ -129,7 +72,7 @@ export const PricingTableRowDesktop = (props: any) => {className="shrink-0 hover:text-scale-300 cursor-pointer transition-colors"data-tip={feat.tooltips[tierName]}>- <InfoIcon />+ <IconPricingInfo /></span>)}{tierValue}@@ -185,11 +128,11 @@ export const PricingTableRowMobile = (props: any) => {<td className="py-3 pr-4 text-right">{typeof feat.tiers[tier] === 'boolean' && feat.tiers[tier] === true ? (<div className="inline-block">- <IncludedCheck tier={tier} />+ <IconPricingIncludedCheck tier={tier} /></div>) : typeof feat.tiers[tier] === 'boolean' && feat.tiers[tier] === false ? (<div className="inline-block">- <Minus tier={tier} />+ <IconPricingMinus tier={tier} /></div>) : (<span className="text-scale-1200 block text-sm">{feat.tiers[tier]}</span>diff --git a/apps/www/pages/pricing/index.tsx b/apps/www/pages/pricing/index.tsxindex 7b6ada1ee13..7aa8120534a 100644--- a/apps/www/pages/pricing/index.tsx+++ b/apps/www/pages/pricing/index.tsx@@ -1,4 +1,3 @@-import { ServerIcon, SupportIcon } from '@heroicons/react/outline'import { Accordion, Button, IconCheck, Select } from 'ui'import Solutions from 'data/Solutions.json'import { NextSeo } from 'next-seo'@@ -8,10 +7,8 @@ import React, { useState } from 'react'import ReactMarkdown from 'react-markdown'import CTABanner from '~/components/CTABanner'import DefaultLayout from '~/components/Layouts/Default'-import PricingAddOnTable from '~/components/Pricing/PricingAddOnTable'import { PricingTableRowDesktop, PricingTableRowMobile } from '~/components/Pricing/PricingTableRow'import pricing from '~/data/Pricing.json'-import pricingAddOn from '~/data/PricingAddOnTable.json'import pricingFaq from '~/data/PricingFAQ.json'import { useTheme } from 'common/Providers'import ComputePricingModal from '~/components/Pricing/ComputePricingModal'