UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
✨ feat: Add apple pay logo
Dillion Vermad6e6f9385465
diff --git a/components/icons.tsx b/components/icons.tsxindex 100b7f2f..ac2ea548 100644--- a/components/icons.tsx+++ b/components/icons.tsx@@ -138,6 +138,13 @@ export const Icons = {/></svg>),+ applePay: (props: LucideProps) => (+ <svg role="img" viewBox="0 0 24 24" {...props}>+ <title>Apple Pay</title>+ <path d="M2.15 4.318a42.16 42.16 0 0 0-.454.003c-.15.005-.303.013-.452.04a1.44 1.44 0 0 0-1.06.772c-.07.138-.114.278-.14.43-.028.148-.037.3-.04.45A10.2 10.2 0 0 0 0 6.222v11.557c0 .07.002.138.003.207.004.15.013.303.04.452.027.15.072.291.142.429a1.436 1.436 0 0 0 .63.63c.138.07.278.115.43.142.148.027.3.036.45.04l.208.003h20.194l.207-.003c.15-.004.303-.013.452-.04.15-.027.291-.071.428-.141a1.432 1.432 0 0 0 .631-.631c.07-.138.115-.278.141-.43.027-.148.036-.3.04-.45.002-.07.003-.138.003-.208l.001-.246V6.221c0-.07-.002-.138-.004-.207a2.995 2.995 0 0 0-.04-.452 1.446 1.446 0 0 0-1.2-1.201 3.022 3.022 0 0 0-.452-.04 10.448 10.448 0 0 0-.453-.003zm0 .512h19.942c.066 0 .131.002.197.003.115.004.25.01.375.032.109.02.2.05.287.094a.927.927 0 0 1 .407.407.997.997 0 0 1 .094.288c.022.123.028.258.031.374.002.065.003.13.003.197v11.552c0 .065 0 .13-.003.196-.003.115-.009.25-.032.375a.927.927 0 0 1-.5.693 1.002 1.002 0 0 1-.286.094 2.598 2.598 0 0 1-.373.032l-.2.003H1.906c-.066 0-.133-.002-.196-.003a2.61 2.61 0 0 1-.375-.032c-.109-.02-.2-.05-.288-.094a.918.918 0 0 1-.406-.407 1.006 1.006 0 0 1-.094-.288 2.531 2.531 0 0 1-.032-.373 9.588 9.588 0 0 1-.002-.197V6.224c0-.065 0-.131.002-.197.004-.114.01-.248.032-.375.02-.108.05-.199.094-.287a.925.925 0 0 1 .407-.406 1.03 1.03 0 0 1 .287-.094c.125-.022.26-.029.375-.032.065-.002.131-.002.196-.003zm4.71 3.7c-.3.016-.668.199-.88.456-.191.22-.36.58-.316.918.338.03.675-.169.888-.418.205-.258.345-.603.308-.955zm2.207.42v5.493h.852v-1.877h1.18c1.078 0 1.835-.739 1.835-1.812 0-1.07-.742-1.805-1.808-1.805zm.852.719h.982c.739 0 1.161.396 1.161 1.089 0 .692-.422 1.092-1.164 1.092h-.979zm-3.154.3c-.45.01-.83.28-1.05.28-.235 0-.593-.264-.981-.257a1.446 1.446 0 0 0-1.23.747c-.527.908-.139 2.255.374 2.995.249.366.549.769.944.754.373-.014.52-.242.973-.242.454 0 .586.242.98.235.41-.007.667-.366.915-.733.286-.417.403-.82.41-.841-.007-.008-.79-.308-.797-1.209-.008-.754.615-1.113.644-1.135-.352-.52-.9-.578-1.09-.593a1.123 1.123 0 0 0-.092-.002zm8.204.397c-.99 0-1.606.533-1.652 1.256h.777c.072-.358.369-.586.845-.586.502 0 .803.266.803.711v.309l-1.097.064c-.951.054-1.488.484-1.488 1.184 0 .72.548 1.207 1.332 1.207.526 0 1.032-.281 1.264-.727h.019v.659h.788v-2.76c0-.803-.62-1.317-1.591-1.317zm1.94.072l1.446 4.009c0 .003-.073.24-.073.247-.125.41-.33.571-.711.571-.069 0-.206 0-.267-.015v.666c.06.011.267.019.335.019.83 0 1.226-.312 1.568-1.283l1.5-4.214h-.868l-1.012 3.259h-.015l-1.013-3.26zm-1.167 2.189v.316c0 .521-.45.917-1.024.917-.442 0-.731-.228-.731-.579 0-.342.278-.56.769-.593z" />+ </svg>+ ),+paypal: (props: LucideProps) => (<svg role="img" viewBox="0 0 24 24" {...props}><pathdiff --git a/components/price-card.tsx b/components/price-card.tsxindex 072ded75..49db3e0e 100644--- a/components/price-card.tsx+++ b/components/price-card.tsx@@ -1,5 +1,8 @@+"use client";++import { Icons } from "@/components/icons";import { buttonVariants } from "@/components/ui/button";-import { cn } from "@/lib/utils";+import { cn, hasApplePay } from "@/lib/utils";import DotPattern from "@/registry/components/magicui/dot-pattern";import FadeIn from "@/registry/components/magicui/fade-in";import { MagicCard } from "@/registry/components/magicui/magic-card";@@ -34,17 +37,32 @@ export const PriceCard = ({one-time payment</span> */}<p className="text-foreground">{item.desc}</p>- <Link- href="https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD"- target="_blank"- className={cn(- buttonVariants({ variant: "default", size: "lg" }),- "w-full"- )}- >- Get Lifetime Access- <ExternalLinkIcon className="ml-2 h-4 w-4" />- </Link>+ {!hasApplePay() && (+ <Link+ href="https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD"+ target="_blank"+ className={cn(+ buttonVariants({ variant: "default", size: "lg" }),+ "w-full"+ )}+ >+ Get Lifetime Access+ <ExternalLinkIcon className="ml-2 h-4 w-4" />+ </Link>+ )}+ {hasApplePay() && (+ <Link+ href="https://buy.stripe.com/00g7vD4Vu8zQb8k5kl?prefilled_promo_code=EARLYBIRD"+ target="_blank"+ className={cn(+ buttonVariants({ variant: "default", size: "lg" }),+ "w-full text-xl gap-1"+ )}+ >+ <Icons.apple className="ml-2 h-5 w-5" />+ <p>Pay</p>+ </Link>+ )}</div><ul className="space-y-3"><li className="pb-2 text-foreground font-medium">diff --git a/lib/utils.ts b/lib/utils.tsindex 9abdf359..04d1459d 100644--- a/lib/utils.ts+++ b/lib/utils.ts@@ -7,6 +7,10 @@ export function cn(...inputs: ClassValue[]) {return twMerge(clsx(inputs));}+export function hasApplePay() {+ return typeof window !== "undefined" && window.ApplePaySession;+}+export const truncate = (str: string | null, length: number) => {if (!str || str.length <= length) return str;return `${str.slice(0, length - 3)}...`;diff --git a/types/index.d.ts b/types/index.d.tsindex 81e760e6..78bd771a 100644--- a/types/index.d.ts+++ b/types/index.d.ts@@ -1,5 +1,11 @@import { Icons } from "@/components/icons";+declare global {+ interface Window {+ ApplePaySession: any;+ }+}+export interface NavItem {title: string;href?: string;