UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
Dillion/sidebar cta (#79)
Dillion Vermadb9e5ac43adf
diff --git a/app/(docs)/docs/[[...slug]]/page.tsx b/app/(docs)/docs/[[...slug]]/page.tsxindex baba46b7..507d28b8 100644--- a/app/(docs)/docs/[[...slug]]/page.tsx+++ b/app/(docs)/docs/[[...slug]]/page.tsx@@ -1,5 +1,6 @@import { Mdx } from "@/components/mdx-components";import { DocPager } from "@/components/pager";+import SidebarCTA from "@/components/sidebar-cta";import { DashboardTableOfContents } from "@/components/toc";import { badgeVariants } from "@/components/ui/badge";import { ScrollArea } from "@/components/ui/scroll-area";@@ -145,6 +146,7 @@ export default async function DocPage({ params }: DocPageProps) {<ScrollArea className="pb-10"><div className="sticky top-16 -mt-10 h-[calc(100vh-3.5rem)] py-12"><DashboardTableOfContents toc={toc} />+ <SidebarCTA /></div></ScrollArea></div>diff --git a/components/sidebar-cta.tsx b/components/sidebar-cta.tsxnew file mode 100644index 00000000..a87c20d2--- /dev/null+++ b/components/sidebar-cta.tsx@@ -0,0 +1,33 @@+"use client";++import AnimatedShinyText from "@/registry/components/magicui/animated-shiny-text";+import WordPullUp from "@/registry/components/magicui/word-pull-up";+import "@/styles/mdx.css";+import { ChevronRight } from "lucide-react";+import Link from "next/link";+import posthog from "posthog-js";++export default function SidebarCTA() {+ return (+ <Link+ href="https://pro.magicui.design"+ target="_blank"+ onClick={() => posthog.capture("sidebar_cta_clicked")}+ className="group my-20 flex w-full flex-col items-center justify-center gap-2 rounded-xl bg-indigo-600 p-4 text-center text-lg font-medium leading-tight text-white"+ >+ <WordPullUp words="Looking for templates?" className="text-4xl" />+ <AnimatedShinyText className="group inline-flex items-center justify-center whitespace-pre via-white/80 text-white dark:text-white">+ ✨ Introducing Magic UI Pro+ <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />+ </AnimatedShinyText>++ <video+ autoPlay+ loop+ muted+ src="/startup-template-demo.mp4"+ className="w-full overflow-hidden rounded-xl shadow-2xl"+ />+ </Link>+ );+}diff --git a/config/dashboard.ts b/config/dashboard.tsdeleted file mode 100644index 96205050..00000000--- a/config/dashboard.ts+++ /dev/null@@ -1,17 +0,0 @@-import { DashboardConfig } from "@/types";--export const dashboardConfig: DashboardConfig = {- mainNav: [],- sidebarNav: [- {- title: "Billing",- href: "/dashboard/billing",- icon: "billing",- },- {- title: "Settings",- href: "/dashboard/settings",- icon: "settings",- },- ],-};diff --git a/config/pricing.tsx b/config/pricing.tsxdeleted file mode 100644index bfdd4520..00000000--- a/config/pricing.tsx+++ /dev/null@@ -1,42 +0,0 @@-import { User2Icon } from "lucide-react";--export const plans = [- {- stripePriceId: "price_1ODMUcKqaLcdpMYsOJ4j8XtA",- Icon: <User2Icon className="flex h-10 w-10 rounded-full stroke-white/40" />,- name: "Magic UI PRO",- sub: "For individual developers and freelancers.",- desc: "Beautifully crafted React + Tailwind CSS + Framer Motion components and templates for your next web project.",- discountPrice: 49,- isDiscounted: true,- price: 129,- isMostPop: true,- banner: "$80 off",- href: "https://buy.stripe.com/14k9DLgEcg2i6S45kq?prefilled_promo_code=SPRINGSALE",- featureHeader: "What's included:",- features: [- "50+ building blocks (300 expected)",- "2 templates (5 expected)",- "Dark mode support",- "Lifetime access",- "Lifetime updates",- "Use on unlimited projects",- "Single developer license",- ],- },- // {- // Icon: (- // <Users2Icon className="flex h-10 w-10 rounded-full stroke-white/40" />- // ),- // name: "Teams",- // sub: "For product teams, agencies and startups.",- // desc: "Beautifully crafted React + Tailwind CSS + Framer Motion components and templates for your next web project.",- // discountPrice: 349,- // price: 499,- // isMostPop: false,- // banner: "30% off",- // href: "https://buy.stripe.com/eVabLTafO5nE4JWbIN?prefilled_promo_code=EARLYBIRDTEAM",- // featureHeader: "Everything in Personal, plus:",- // features: ["10 developer licenses"],- // },-];diff --git a/config/subscriptions.ts b/config/subscriptions.tsdeleted file mode 100644index 779800da..00000000--- a/config/subscriptions.ts+++ /dev/null@@ -1,14 +0,0 @@-import { SubscriptionPlan } from "types";--export const freePlan: SubscriptionPlan = {- name: "Free",- description:- "The free plan has limited access. Upgrade to the PRO plan for unlimited access to all features.",- stripePriceId: "",-};--export const proPlan: SubscriptionPlan = {- name: "PRO",- description: "The PRO plan has unlimited access to all features.",- stripePriceId: "price_1NNmTCKqaLcdpMYsfbisFtY2",-};diff --git a/contentlayer.config.ts b/contentlayer.config.tsindex b808f4bd..41b0edb7 100644--- a/contentlayer.config.ts+++ b/contentlayer.config.ts@@ -109,7 +109,7 @@ export const Doc = defineDocumentType(() => ({default: false,required: false,},- toc: { type: "boolean", default: false, required: false },+ toc: { type: "boolean", default: true, required: false },author: { type: "string", required: false },video: { type: "string", required: false },},diff --git a/prisma/schema.prisma b/prisma/schema.prismadeleted file mode 100644index 75f8c2a5..00000000--- a/prisma/schema.prisma+++ /dev/null@@ -1,109 +0,0 @@-// This is your Prisma schema file,-// learn more about it in the docs: https://pris.ly/d/prisma-schema--generator client {- provider = "prisma-client-js"-}--datasource db {- provider = "postgresql"- url = env("DATABASE_URL")-}--model Account {- id String @id @default(cuid())- createdAt DateTime @default(now())- updatedAt DateTime @default(now()) @updatedAt- userId String- type String- provider String- providerAccountId String @map("provider_account_id")- refresh_token String? @db.Text- refresh_token_expires_in Int?- access_token String? @db.Text- expires_at Int?- token_type String?- scope String?- id_token String? @db.Text- session_state String?-- user User @relation(fields: [userId], references: [id], onDelete: Cascade)-- @@unique([provider, providerAccountId])- @@index([userId])-}--model Session {- id String @id @default(cuid())- sessionToken String @unique- userId String- expires DateTime- user User @relation(fields: [userId], references: [id], onDelete: Cascade)-- @@index([userId])-}--enum Role {- USER- ADMIN-}--model User {- id String @id @unique @default(cuid())- createdAt DateTime @default(now())- updatedAt DateTime @default(now()) @updatedAt-- name String?- email String? @unique- emailVerified DateTime?- image String?- role Role @default(USER)-- customer Customer? // User can be a customer- accounts Account[]- sessions Session[]-- @@index([id])-}--// Stripe Customer-model Customer {- id String @id @default(uuid())- createdAt DateTime @default(now())- updatedAt DateTime @default(now()) @updatedAt-- user User? @relation(fields: [userId], references: [id])- userId String? @unique-- stripeId String @unique-- payments Payment[]-- @@index([userId])-}--// Stripe Payment-model Payment {- id String @id @default(uuid())- createdAt DateTime @default(now())- updatedAt DateTime @default(now()) @updatedAt-- stripeId String @unique- amount Int- currency String- status String- receiptUrl String?-- customer Customer @relation(fields: [customerId], references: [id])- customerId String-- @@index([customerId])-}--model VerificationToken {- identifier String- token String @unique- expires DateTime-- @@unique([identifier, token])-}diff --git a/prisma/seed.ts b/prisma/seed.tsdeleted file mode 100644index b10976e1..00000000--- a/prisma/seed.ts+++ /dev/null@@ -1,81 +0,0 @@-import { PrismaClient } from "@prisma/client";-import Stripe from "stripe";--const db = new PrismaClient();--export const stripe = new Stripe(process.env.STRIPE_API_KEY!, {- apiVersion: "2022-11-15",- typescript: true,-});--class StripeService {- async getCustomers() {- const customers = [];- for await (const customer of stripe.customers.list()) {- customers.push(customer);- }- return customers;- }-- async getPaymentIntents(customerId: string) {- const payments = [];- for await (const payment of stripe.charges.list({ customer: customerId })) {- payments.push(payment);- }- return payments;- }-}--async function seed() {- const stripe = new StripeService();- const customers = await stripe.getCustomers();-- for (const c of customers) {- if (!c.email) throw new Error("Customer email is required");- try {- const user = await db.user.upsert({- where: { email: c.email },- update: {},- create: { email: c.email, name: c.name },- });-- const customer = await db.customer.upsert({- where: { stripeId: c.id },- update: {},- create: {- stripeId: c.id,- user: { connect: { id: user.id } },- },- });-- const stripePayments = await stripe.getPaymentIntents(c.id);-- console.log(stripePayments);-- for (const stripePayment of stripePayments) {- await db.payment.create({- data: {- customerId: customer.id,- stripeId: stripePayment.id,- amount: stripePayment.amount,- currency: stripePayment.currency,- status: stripePayment.status,- receiptUrl: stripePayment.receipt_url,- },- });- }- console.log("✅ " + c.email);- } catch (e) {- console.log("❌ " + c.email);- }- }-}--seed()- .catch((e) => {- console.error(e);- process.exit(1);- })- .finally(async () => {- await db.$disconnect();- });diff --git a/registry/components/magicui/typing-animation.tsx b/registry/components/magicui/typing-animation.tsxindex 4b8b289f..20acc14d 100644--- a/registry/components/magicui/typing-animation.tsx+++ b/registry/components/magicui/typing-animation.tsx@@ -35,7 +35,7 @@ export default function TypingAnimation({return (<h1className={cn(- 'text-center font-display text-4xl font-bold tracking-[-0.02em] drop-shadow-sm md:text-7xl md:leading-[5rem]',+ "font-display text-center text-4xl font-bold leading-[5rem] tracking-[-0.02em] drop-shadow-sm",className,)}>diff --git a/registry/components/magicui/word-pull-up.tsx b/registry/components/magicui/word-pull-up.tsxindex acc429fe..19617e65 100644--- a/registry/components/magicui/word-pull-up.tsx+++ b/registry/components/magicui/word-pull-up.tsx@@ -34,7 +34,7 @@ export default function WordPullUp({initial="hidden"animate="show"className={cn(- "font-display text-center text-4xl font-bold tracking-[-0.02em] drop-shadow-sm md:text-7xl md:leading-[5rem]",+ "font-display text-center text-4xl font-bold leading-[5rem] tracking-[-0.02em] drop-shadow-sm",className,)}>@@ -42,7 +42,7 @@ export default function WordPullUp({<motion.spankey={i}variants={framerProps}- style={{ display: "inline-block", paddingRight: "15px" }}+ style={{ display: "inline-block", paddingRight: "8px" }}>{word === "" ? <span> </span> : word}</motion.span>