Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

stashed changes

Steven Tey91583fc54c61
diff --git a/components/home/pricing.tsx b/components/home/pricing.tsx
index 7525c29f3f..4926b00c43 100644
--- a/components/home/pricing.tsx
+++ b/components/home/pricing.tsx
@@ -28,7 +28,6 @@ const pricingItems = [
{
plan: "Pro",
tagline: "For larger teams with increased usage",
- isPopular: true,
price: 99,
features: [
{
@@ -62,12 +61,12 @@ const pricingItems = [
const Pricing = () => {
return (
- <MaxWidthWrapper className="mt-20 mb-40 text-center">
- <div className="max-w-sm sm:max-w-md mx-auto my-10">
+ <MaxWidthWrapper className="sm:mt-20 mb-40 text-center">
+ <div className="max-w-sm sm:max-w-lg mx-auto my-10">
<h2 className="text-4xl sm:text-5xl font-display font-extrabold text-black">
Simple,{" "}
<span className="text-transparent bg-clip-text bg-gradient-to-r from-blue-600 to-cyan-600">
- affordable
+ usage-based
</span>{" "}
pricing
</h2>
@@ -77,16 +76,16 @@ const Pricing = () => {
</div>
<div className="grid grid-cols-1 lg:grid-cols-3 gap-10">
{pricingItems.map(
- ({ plan, tagline, isPopular, price, features, cta, ctaLink }) => (
+ ({ plan, tagline, price, features, cta, ctaLink }) => (
<div
key={plan}
className={`relative bg-white rounded-2xl ${
- isPopular
+ plan === "Pro"
? "border-2 border-blue-600 shadow-blue-200"
: "border border-gray-200"
} shadow-md`}
>
- {isPopular && (
+ {plan === "Pro" && (
<div className="absolute -top-5 left-0 right-0 mx-auto bg-gradient-to-r from-blue-600 to-cyan-600 text-white text-sm font-medium w-32 px-3 py-2 rounded-full">
Popular
</div>
@@ -139,7 +138,7 @@ const Pricing = () => {
<Link href={ctaLink}>
<a
className={`${
- isPopular
+ plan === "Pro"
? "bg-gradient-to-r from-blue-600 to-cyan-600 hover:bg-white text-white hover:text-transparent hover:bg-clip-text border border-transparent hover:border-blue-700"
: "bg-black text-white hover:bg-white hover:text-black border border-gray-200 hover:border-black"
} block w-full py-2 rounded-full font-medium transition-all`}
diff --git a/components/shared/slider.tsx b/components/shared/slider.tsx
new file mode 100644
index 0000000000..9671ebd367
--- /dev/null
+++ b/components/shared/slider.tsx
@@ -0,0 +1,29 @@
+import * as SliderPrimitive from "@radix-ui/react-slider";
+import cx from "classnames";
+import React from "react";
+
+interface Props {}
+
+const Slider = (props: Props) => {
+ return (
+ <SliderPrimitive.Root
+ defaultValue={[50]}
+ max={100}
+ step={1}
+ aria-label="value"
+ className="relative flex h-5 w-64 touch-none items-center"
+ >
+ <SliderPrimitive.Track className="relative h-1 w-full grow rounded-full bg-white dark:bg-gray-800">
+ <SliderPrimitive.Range className="absolute h-full rounded-full bg-blue-600 dark:bg-white" />
+ </SliderPrimitive.Track>
+ <SliderPrimitive.Thumb
+ className={cx(
+ "block h-5 w-5 rounded-full bg-blue-600 dark:bg-white",
+ "focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75"
+ )}
+ />
+ </SliderPrimitive.Root>
+ );
+};
+
+export default Slider;
diff --git a/package.json b/package.json
index 768df413fc..1ce35bd69f 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
"@headlessui/react": "^1.6.6",
"@next-auth/prisma-adapter": "^1.0.4",
"@prisma/client": "^4.3.1",
+ "@radix-ui/react-slider": "^1.0.0",
"@radix-ui/react-tooltip": "^1.0.0",
"@stripe/stripe-js": "^1.36.0",
"@tailwindcss/forms": "^0.5.3",
diff --git a/yarn.lock b/yarn.lock
index 14415f6e6d..45fb4afd90 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -413,6 +413,13 @@
resolved "https://registry.npmjs.org/@prisma/engines/-/engines-4.3.1.tgz"
integrity sha512-4JF/uMaEDAPdcdZNOrnzE3BvrbGpjgV0FcPT3EVoi6I86fWkloqqxBt+KcK/+fIRR0Pxj66uGR9wVH8U1Y13JA==
+"@radix-ui/[email protected]":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@radix-ui/number/-/number-1.0.0.tgz#4c536161d0de750b3f5d55860fc3de46264f897b"
+ integrity sha512-Ofwh/1HX69ZfJRiRBMTy7rgjAzHmwe4kW9C9Y99HTRUcYLUuVT0KESFj15rPjRgKJs20GPq8Bm5aEDJ8DuA3vA==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+
"@radix-ui/[email protected]":
version "1.0.0"
resolved "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.0.0.tgz"
@@ -428,6 +435,17 @@
"@babel/runtime" "^7.13.10"
"@radix-ui/react-primitive" "1.0.0"
+"@radix-ui/[email protected]":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-collection/-/react-collection-1.0.0.tgz#0ec4c72fabd35a03b5787075ac799e3b17ca5710"
+ integrity sha512-8i1pf5dKjnq90Z8udnnXKzdCEV3/FYrfw0n/b6NvB6piXEn3fO1bOh7HBcpG8XrnIXzxlYu2oCcR38QpyLS/mg==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+ "@radix-ui/react-compose-refs" "1.0.0"
+ "@radix-ui/react-context" "1.0.0"
+ "@radix-ui/react-primitive" "1.0.0"
+ "@radix-ui/react-slot" "1.0.0"
+
"@radix-ui/[email protected]":
version "1.0.0"
resolved "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.0.0.tgz"
@@ -442,6 +460,13 @@
dependencies:
"@babel/runtime" "^7.13.10"
+"@radix-ui/[email protected]":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.0.0.tgz#a2e0b552352459ecf96342c79949dd833c1e6e45"
+ integrity sha512-2HV05lGUgYcA6xgLQ4BKPDmtL+QbIZYH5fCOTAOOcJ5O0QbWS3i9lKaurLzliYUDhORI2Qr3pyjhJh44lKA3rQ==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+
"@radix-ui/[email protected]":
version "1.0.0"
resolved "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.0.0.tgz"
@@ -503,6 +528,24 @@
"@babel/runtime" "^7.13.10"
"@radix-ui/react-slot" "1.0.0"
+"@radix-ui/react-slider@^1.0.0":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-slider/-/react-slider-1.0.0.tgz#4cabadd243aa088eb45ac710cd7cdc518fafb07e"
+ integrity sha512-LMZET7vn7HYwYSjsc9Jcen8Vn4cJXZZxQT7T+lGlqp+F+FofX+H86TBF2yDq+L51d99f1KLEsflTGBz9WRLSig==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+ "@radix-ui/number" "1.0.0"
+ "@radix-ui/primitive" "1.0.0"
+ "@radix-ui/react-collection" "1.0.0"
+ "@radix-ui/react-compose-refs" "1.0.0"
+ "@radix-ui/react-context" "1.0.0"
+ "@radix-ui/react-direction" "1.0.0"
+ "@radix-ui/react-primitive" "1.0.0"
+ "@radix-ui/react-use-controllable-state" "1.0.0"
+ "@radix-ui/react-use-layout-effect" "1.0.0"
+ "@radix-ui/react-use-previous" "1.0.0"
+ "@radix-ui/react-use-size" "1.0.0"
+
"@radix-ui/[email protected]":
version "1.0.0"
resolved "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.0.tgz"
@@ -560,6 +603,13 @@
dependencies:
"@babel/runtime" "^7.13.10"
+"@radix-ui/[email protected]":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@radix-ui/react-use-previous/-/react-use-previous-1.0.0.tgz#e48a69c3a7d8078a967084038df66d0d181c56ac"
+ integrity sha512-RG2K8z/K7InnOKpq6YLDmT49HGjNmrK+fr82UCVKT2sW0GYfVnYp4wZWBooT/EYfQ5faA9uIjvsuMMhH61rheg==
+ dependencies:
+ "@babel/runtime" "^7.13.10"
+
"@radix-ui/[email protected]":
version "1.0.0"
resolved "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.0.0.tgz"