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/logos/PackLogo.tsx | 16 ++++ docs/components/logos/RepoLogo.tsx | 16 ++++ docs/components/logos/Turbo.tsx | 62 +++++++++++++ docs/components/logos/TurboAnimated.tsx | 157 ++++++++++++++++++++++++++++++++ docs/components/logos/Vercel.tsx | 11 +++ docs/components/logos/og/PackLogo.tsx | 72 +++++++++++++++ docs/components/logos/og/RepoLogo.tsx | 70 ++++++++++++++ docs/components/logos/og/TurboLogo.tsx | 54 +++++++++++ docs/components/logos/og/VercelLogo.tsx | 16 ++++ 9 files changed, 474 insertions(+) create mode 100644 docs/components/logos/PackLogo.tsx create mode 100644 docs/components/logos/RepoLogo.tsx create mode 100644 docs/components/logos/Turbo.tsx create mode 100644 docs/components/logos/TurboAnimated.tsx create mode 100644 docs/components/logos/Vercel.tsx create mode 100644 docs/components/logos/og/PackLogo.tsx create mode 100644 docs/components/logos/og/RepoLogo.tsx create mode 100644 docs/components/logos/og/TurboLogo.tsx create mode 100644 docs/components/logos/og/VercelLogo.tsx (limited to 'docs/components/logos') diff --git a/docs/components/logos/PackLogo.tsx b/docs/components/logos/PackLogo.tsx new file mode 100644 index 0000000..ddb1d36 --- /dev/null +++ b/docs/components/logos/PackLogo.tsx @@ -0,0 +1,16 @@ +const PackLogo = (props) => ( + + Turbopack logo + + + + + + + + + + +); + +export default PackLogo; diff --git a/docs/components/logos/RepoLogo.tsx b/docs/components/logos/RepoLogo.tsx new file mode 100644 index 0000000..2751733 --- /dev/null +++ b/docs/components/logos/RepoLogo.tsx @@ -0,0 +1,16 @@ +const RepoLogo = (props) => ( + + Turborepo logo + + + + + + + + + + +); + +export default RepoLogo; diff --git a/docs/components/logos/Turbo.tsx b/docs/components/logos/Turbo.tsx new file mode 100644 index 0000000..d873e5f --- /dev/null +++ b/docs/components/logos/Turbo.tsx @@ -0,0 +1,62 @@ +type LogoProps = { + className?: string; + height?: number; +}; + +const Turbo = ({ height = 32, className = "" }: LogoProps) => ( + + Turborepo + + + + + + + + + + + + + + +); + +export default Turbo; diff --git a/docs/components/logos/TurboAnimated.tsx b/docs/components/logos/TurboAnimated.tsx new file mode 100644 index 0000000..c70f42d --- /dev/null +++ b/docs/components/logos/TurboAnimated.tsx @@ -0,0 +1,157 @@ +import { AnimatePresence, motion, Variants } from "framer-motion"; +import { useTurboSite } from "../SiteSwitcher"; +import cn from "classnames"; +import styles from "../header-logo.module.css"; + +type LogoProps = { + className?: string; + height?: number; +}; + +const LEFT_PADDING = 8; +const RIGHT_PADDING = 12; +// The width of the logo + wordmark. This does not include the "invisible" padding. +const VISUAL_WIDTH = 112; + +const TurboAnimated = ({ height = 32, className = "" }: LogoProps) => { + const site = useTurboSite(); + + return ( + + Turborepo + + + + + + + + + + + + + + + + + + + + {site === "repo" || site === undefined ? ( + + + + + ) : ( + + + + + )} + + + + {/* Turbo Wordmark */} + + + + + + + + + ); +}; + +export default TurboAnimated; + +const variants: Variants = { + visible: { + opacity: 1, + x: 0, + transition: { + duration: 0.3, + }, + }, + hidden: (distance) => ({ + opacity: 0, + x: distance, + transition: { + duration: 0.3, + }, + }), +}; diff --git a/docs/components/logos/Vercel.tsx b/docs/components/logos/Vercel.tsx new file mode 100644 index 0000000..36b5e81 --- /dev/null +++ b/docs/components/logos/Vercel.tsx @@ -0,0 +1,11 @@ +const Vercel = ({ height = 20 }: { height?: number }) => ( + + Vercel + + +); + +export default Vercel; diff --git a/docs/components/logos/og/PackLogo.tsx b/docs/components/logos/og/PackLogo.tsx new file mode 100644 index 0000000..a2bc95a --- /dev/null +++ b/docs/components/logos/og/PackLogo.tsx @@ -0,0 +1,72 @@ +const PackLogo = (props) => ( + + + + + + + + + + + + + + + + + + + +); + +export default PackLogo; diff --git a/docs/components/logos/og/RepoLogo.tsx b/docs/components/logos/og/RepoLogo.tsx new file mode 100644 index 0000000..f09a1ff --- /dev/null +++ b/docs/components/logos/og/RepoLogo.tsx @@ -0,0 +1,70 @@ +const RepoLogo = (props) => ( + + + + + + + + + + + + + + + + + + + +); + +export default RepoLogo; diff --git a/docs/components/logos/og/TurboLogo.tsx b/docs/components/logos/og/TurboLogo.tsx new file mode 100644 index 0000000..5646ce2 --- /dev/null +++ b/docs/components/logos/og/TurboLogo.tsx @@ -0,0 +1,54 @@ +const TurboLogo = (props) => ( + + + + + + + + + + + + + + + +); + +export default TurboLogo; diff --git a/docs/components/logos/og/VercelLogo.tsx b/docs/components/logos/og/VercelLogo.tsx new file mode 100644 index 0000000..020f271 --- /dev/null +++ b/docs/components/logos/og/VercelLogo.tsx @@ -0,0 +1,16 @@ +const VercelLogo = ({ + fill = "none", + height = 20, +}: { + fill?: string; + height?: number; +}) => ( + + + +); + +export default VercelLogo; -- cgit v1.2.3-70-g09d2