-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6289520
commit caea4f1
Showing
9 changed files
with
357 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
"use client" | ||
|
||
import React, { forwardRef, useRef } from "react" | ||
import { AudioLines, FileText, Image, Text, Video } from "lucide-react" | ||
|
||
import { cn } from "@/lib/utils" | ||
import { AnimatedBeam } from "@/components/ui/animated-beam" | ||
|
||
import { Icons } from "./icons" | ||
|
||
const Circle = forwardRef< | ||
HTMLDivElement, | ||
{ className?: string; children?: React.ReactNode } | ||
>(({ className, children }, ref) => { | ||
return ( | ||
<div | ||
ref={ref} | ||
className={cn( | ||
"z-10 flex size-12 items-center justify-center rounded-full border-2 bg-white p-3 shadow-[0_0_20px_-12px_rgba(0,0,0,0.8)]", | ||
className | ||
)} | ||
> | ||
{children} | ||
</div> | ||
) | ||
}) | ||
|
||
Circle.displayName = "Circle" | ||
|
||
export function DownloadFlow({ className }: { className?: string }) { | ||
const containerRef = useRef<HTMLDivElement>(null) | ||
const div1Ref = useRef<HTMLDivElement>(null) | ||
const div2Ref = useRef<HTMLDivElement>(null) | ||
const div3Ref = useRef<HTMLDivElement>(null) | ||
const div4Ref = useRef<HTMLDivElement>(null) | ||
const div5Ref = useRef<HTMLDivElement>(null) | ||
const div6Ref = useRef<HTMLDivElement>(null) | ||
const div7Ref = useRef<HTMLDivElement>(null) | ||
|
||
return ( | ||
<div | ||
className={cn( | ||
"relative flex w-full items-center justify-center overflow-hidden rounded-lg border bg-background p-10 md:shadow-xl", | ||
className | ||
)} | ||
ref={containerRef} | ||
> | ||
<div className="flex size-full max-w-lg flex-row items-stretch justify-between gap-10"> | ||
<div className="flex flex-col justify-center"> | ||
<Circle ref={div7Ref}> | ||
<Icons.notion /> | ||
</Circle> | ||
</div> | ||
<div className="flex flex-col justify-center"> | ||
<Circle ref={div6Ref} className="size-16"> | ||
<Icons.logo /> | ||
</Circle> | ||
</div> | ||
<div className="flex flex-col justify-center gap-2"> | ||
<Circle ref={div1Ref}> | ||
<Text className="text-black" /> | ||
</Circle> | ||
<Circle ref={div2Ref}> | ||
<Image className="text-black" /> | ||
</Circle> | ||
<Circle ref={div3Ref}> | ||
<Video className="text-black" /> | ||
</Circle> | ||
<Circle ref={div4Ref}> | ||
<AudioLines className="text-black" /> | ||
</Circle> | ||
<Circle ref={div5Ref}> | ||
<FileText className="text-black" /> | ||
</Circle> | ||
</div> | ||
</div> | ||
|
||
{/* AnimatedBeams */} | ||
<AnimatedBeam | ||
containerRef={containerRef} | ||
fromRef={div1Ref} | ||
toRef={div6Ref} | ||
duration={3} | ||
/> | ||
<AnimatedBeam | ||
containerRef={containerRef} | ||
fromRef={div2Ref} | ||
toRef={div6Ref} | ||
duration={3} | ||
/> | ||
<AnimatedBeam | ||
containerRef={containerRef} | ||
fromRef={div3Ref} | ||
toRef={div6Ref} | ||
duration={3} | ||
/> | ||
<AnimatedBeam | ||
containerRef={containerRef} | ||
fromRef={div4Ref} | ||
toRef={div6Ref} | ||
duration={3} | ||
/> | ||
<AnimatedBeam | ||
containerRef={containerRef} | ||
fromRef={div5Ref} | ||
toRef={div6Ref} | ||
duration={3} | ||
/> | ||
<AnimatedBeam | ||
containerRef={containerRef} | ||
fromRef={div6Ref} | ||
toRef={div7Ref} | ||
duration={3} | ||
/> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.