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.

update StripeIcon to new version

Steven Tey1b6b6e0f7901
diff --git a/apps/web/ui/guides/integrations.ts b/apps/web/ui/guides/integrations.ts
index 1eddc1c750..2a6932482b 100644
--- a/apps/web/ui/guides/integrations.ts
+++ b/apps/web/ui/guides/integrations.ts
@@ -9,10 +9,10 @@ import { NextAuth } from "@/ui/guides/icons/next-auth";
import { React } from "@/ui/guides/icons/react";
import { Segment } from "@/ui/guides/icons/segment";
import { Shopify } from "@/ui/guides/icons/shopify";
-import { Stripe } from "@/ui/guides/icons/stripe";
import { Supabase } from "@/ui/guides/icons/supabase";
import { Webflow } from "@/ui/guides/icons/webflow";
import { Wordpress } from "@/ui/guides/icons/wordpress";
+import { StripeIcon } from "@dub/ui/icons";
export type IntegrationType = "client-sdk" | "track-lead" | "track-sale";
@@ -183,7 +183,7 @@ export const guides: IntegrationGuide[] = [
subtitle: "Checkout",
recommended: true,
description: "Stripe Checkout",
- icon: Stripe,
+ icon: StripeIcon,
iconProps: {
fullSize: true,
},
@@ -195,7 +195,7 @@ export const guides: IntegrationGuide[] = [
title: "Stripe",
subtitle: "Payment Links",
description: "Stripe Payment Links",
- icon: Stripe,
+ icon: StripeIcon,
iconProps: {
fullSize: true,
},
@@ -207,7 +207,7 @@ export const guides: IntegrationGuide[] = [
title: "Stripe",
subtitle: "Customers",
description: "Stripe Customers",
- icon: Stripe,
+ icon: StripeIcon,
iconProps: {
fullSize: true,
},
diff --git a/apps/web/ui/partners/discounts/add-edit-discount-sheet.tsx b/apps/web/ui/partners/discounts/add-edit-discount-sheet.tsx
index 44cbed8060..7f1ed555d4 100644
--- a/apps/web/ui/partners/discounts/add-edit-discount-sheet.tsx
+++ b/apps/web/ui/partners/discounts/add-edit-discount-sheet.tsx
@@ -11,7 +11,6 @@ import useWorkspace from "@/lib/swr/use-workspace";
import { DiscountProps } from "@/lib/types";
import { createDiscountSchema } from "@/lib/zod/schemas/discount";
import { RECURRING_MAX_DURATIONS } from "@/lib/zod/schemas/misc";
-import { Stripe } from "@/ui/guides/icons/stripe";
import { X } from "@/ui/shared/icons";
import {
InlineBadgePopover,
@@ -19,7 +18,7 @@ import {
} from "@/ui/shared/inline-badge-popover";
import { UpgradeRequiredToast } from "@/ui/shared/upgrade-required-toast";
import { Button, InfoTooltip, Sheet, Switch } from "@dub/ui";
-import { CircleCheckFill, Tag } from "@dub/ui/icons";
+import { CircleCheckFill, StripeIcon, Tag } from "@dub/ui/icons";
import { capitalize, cn, pluralize } from "@dub/utils";
import { useAction } from "next-safe-action/hooks";
import {
@@ -377,7 +376,7 @@ function DiscountSheetContent({
)}
title={
<>
- <Stripe className="size-7" />
+ <StripeIcon className="size-7" />
<span className="leading-relaxed">
Discount a{" "}
<InlineBadgePopover
diff --git a/apps/web/ui/partners/payout-methods-dropdown.tsx b/apps/web/ui/partners/payout-methods-dropdown.tsx
index 472a994d80..4d4c324240 100644
--- a/apps/web/ui/partners/payout-methods-dropdown.tsx
+++ b/apps/web/ui/partners/payout-methods-dropdown.tsx
@@ -4,13 +4,7 @@ import { generatePaypalOAuthUrl } from "@/lib/actions/partners/generate-paypal-o
import { generateStripeAccountLink } from "@/lib/actions/partners/generate-stripe-account-link";
import usePartnerProfile from "@/lib/swr/use-partner-profile";
import { PartnerProps } from "@/lib/types";
-import {
- Button,
- MatrixLines,
- Paypal,
- Popover,
- Stripe as StripeIcon,
-} from "@dub/ui";
+import { Button, MatrixLines, Paypal, Popover, StripeIcon } from "@dub/ui";
import {
cn,
CONNECT_SUPPORTED_COUNTRIES,
@@ -168,7 +162,8 @@ export function PayoutMethodsDropdown() {
<div className="flex items-center gap-x-2">
<div
className={cn(
- "size-8 shrink-0 rounded-lg p-2",
+ "size-8 shrink-0 rounded-lg",
+ id === "paypal" && "p-2",
color,
)}
>
@@ -222,7 +217,8 @@ export function PayoutMethodsDropdown() {
<div className="flex min-w-0 items-center gap-x-2.5 pr-2">
<div
className={cn(
- "size-8 shrink-0 rounded-lg p-2",
+ "size-8 shrink-0 rounded-lg",
+ selectedMethod?.id === "paypal" && "p-2",
selectedMethod?.color,
)}
>
diff --git a/packages/ui/src/icons/index.tsx b/packages/ui/src/icons/index.tsx
index 83c28cfbf6..ac0d17ec35 100644
--- a/packages/ui/src/icons/index.tsx
+++ b/packages/ui/src/icons/index.tsx
@@ -50,6 +50,7 @@ export * from "./payment-platforms/card-discover";
export * from "./payment-platforms/card-mastercard";
export * from "./payment-platforms/card-visa";
export * from "./payment-platforms/paypal";
+export * from "./payment-platforms/stripe-icon";
export * from "./payment-platforms/stripe-link";
// SDKs
diff --git a/packages/ui/src/icons/payment-platforms/stripe-icon.tsx b/packages/ui/src/icons/payment-platforms/stripe-icon.tsx
new file mode 100644
index 0000000000..ca2d5ee46f
--- /dev/null
+++ b/packages/ui/src/icons/payment-platforms/stripe-icon.tsx
@@ -0,0 +1,31 @@
+import { cn } from "@dub/utils";
+import { SVGProps } from "react";
+
+export function StripeIcon(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ width="32"
+ height="32"
+ viewBox="0 0 32 32"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ {...props}
+ className={cn("text-[#543AFD]", props.className)}
+ >
+ <path
+ d="M8 0.5H24C28.1421 0.5 31.5 3.85786 31.5 8V24C31.5 28.1421 28.1421 31.5 24 31.5H8C3.85786 31.5 0.5 28.1421 0.5 24V8C0.5 3.85786 3.85786 0.5 8 0.5Z"
+ fill="currentColor"
+ />
+ <path
+ d="M8 0.5H24C28.1421 0.5 31.5 3.85786 31.5 8V24C31.5 28.1421 28.1421 31.5 24 31.5H8C3.85786 31.5 0.5 28.1421 0.5 24V8C0.5 3.85786 3.85786 0.5 8 0.5Z"
+ stroke="#E5E5E5"
+ />
+ <path
+ fillRule="evenodd"
+ clipRule="evenodd"
+ d="M9 11.8726L23 9V20.0943L9 23V11.9057V11.8726Z"
+ fill="white"
+ />
+ </svg>
+ );
+}