From 4838df315931bb883f704ec3e1abe2685f296cdf Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Sat, 22 Apr 2023 19:52:26 +0800 Subject: 😀 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/components/LogoContext/items.tsx | 91 +++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 docs/components/LogoContext/items.tsx (limited to 'docs/components/LogoContext/items.tsx') diff --git a/docs/components/LogoContext/items.tsx b/docs/components/LogoContext/items.tsx new file mode 100644 index 0000000..6ce1fe6 --- /dev/null +++ b/docs/components/LogoContext/items.tsx @@ -0,0 +1,91 @@ +import { + VercelLogo, + TurborepoLogo, + TurbopackLogo, + IconType, + NextJSLogo, + DesignSystemLogo, +} from "./icons"; +import type { ContextItem, ContextList } from "./types"; +import copy from "copy-to-clipboard"; + +export const PLATFORM_MENU_ITEMS = ({ + theme, +}: ContextList): Array => [ + { + name: "copy-logo", + "aria-label": "Copy Logo as SVG to Clipboard", + children: "Copy Logo as SVG", + prefix: , + type: "copy", + onClick: () => { + copy( + ` + + ` + ); + }, + }, + { + name: "copy-wordmark", + "aria-label": "Copy Wordmark as SVG to Clipboard", + children: "Copy Wordmark as SVG", + prefix: , + type: "copy", + onClick: () => { + copy( + // NOTE: We include `xmlns` as this is required when the SVG isn't inlined. + `` + ); + }, + }, + { + name: "brand-guidelines", + "aria-label": "Open Brand Guidelines in New Tab", + children: "Brand Guidelines", + prefix: , + type: "external", + href: "https://vercel.com/design/brands", + }, +]; + +export const PRODUCT_MENU_ITEMS = ({ + site, +}: ContextList): Array => [ + { + name: "next-js", + "aria-label": "Open Next.js Home in New Tab", + children: "Next.js", + prefix: , + type: "external", + href: "https://nextjs.org", + }, + { + name: "turborepo", + "aria-label": "Open Turborepo Home in New Tab", + disabled: site === "repo", + children: "Turborepo", + prefix: , + type: "internal", + href: "/repo", + }, + { + name: "turbopack", + "aria-label": "Open Turbopack Home in New Tab", + disabled: site === "pack", + children: "Turbopack", + prefix: , + type: "internal", + href: "/pack", + }, +]; -- cgit v1.2.3-70-g09d2