-
Notifications
You must be signed in to change notification settings - Fork 777
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
Showing
10 changed files
with
202 additions
and
44 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
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
31 changes: 31 additions & 0 deletions
31
src/app/(dashboard)/onboarding/_components/step-header.tsx
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,31 @@ | ||
import { motion } from "framer-motion" | ||
|
||
interface StepHeaderProps { | ||
title: string | ||
description?: string | ||
} | ||
|
||
export function StepHeader({ title, description }: StepHeaderProps) { | ||
return ( | ||
<motion.div | ||
variants={{ | ||
hidden: { opacity: 0, x: 250 }, | ||
show: { | ||
opacity: 1, | ||
x: 0, | ||
transition: { duration: 0.4, type: "spring" }, | ||
}, | ||
}} | ||
className="w-full space-y-1.5" | ||
> | ||
<h1 className="text-pretty text-2xl font-bold transition-colors sm:text-3xl"> | ||
{title} | ||
</h1> | ||
{description ? ( | ||
<p className="text-pretty text-sm text-muted-foreground transition-colors sm:text-base"> | ||
You can update your store name and description later | ||
</p> | ||
) : null} | ||
</motion.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import * as React from "react" | ||
|
||
import { cn } from "@/lib/utils" | ||
|
||
interface GridPatternProps extends React.SVGProps<SVGSVGElement> { | ||
squares?: Array<[x: number, y: number]> | ||
width?: number | ||
height?: number | ||
} | ||
|
||
export function GridPattern({ | ||
width = 40, | ||
height = 40, | ||
x = -1, | ||
y = -1, | ||
strokeDasharray = 0, | ||
squares, | ||
className, | ||
...props | ||
}: GridPatternProps) { | ||
const id = React.useId() | ||
|
||
return ( | ||
<svg | ||
aria-hidden="true" | ||
className={cn( | ||
"pointer-events-none absolute inset-0 size-full fill-gray-400/30 stroke-gray-400/30", | ||
className | ||
)} | ||
{...props} | ||
> | ||
<defs> | ||
<pattern | ||
id={id} | ||
width={width} | ||
height={height} | ||
patternUnits="userSpaceOnUse" | ||
x={x} | ||
y={y} | ||
> | ||
<path | ||
d={`M.5 ${height}V.5H${width}`} | ||
fill="none" | ||
strokeDasharray={strokeDasharray} | ||
/> | ||
</pattern> | ||
</defs> | ||
<rect width="100%" height="100%" strokeWidth={0} fill={`url(#${id})`} /> | ||
{squares && ( | ||
<svg x={x} y={y} className="overflow-visible"> | ||
{squares.map(([x, y]) => ( | ||
<rect | ||
strokeWidth="0" | ||
key={`${x}-${y}`} | ||
width={width - 1} | ||
height={height - 1} | ||
x={x * width + 1} | ||
y={y * height + 1} | ||
/> | ||
))} | ||
</svg> | ||
)} | ||
</svg> | ||
) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { cn } from "@/lib/utils" | ||
|
||
type Type = "circle" | "ellipse" | ||
|
||
type Origin = | ||
| "center" | ||
| "top" | ||
| "bottom" | ||
| "left" | ||
| "right" | ||
| "top left" | ||
| "top right" | ||
| "bottom left" | ||
| "bottom right" | ||
|
||
interface RadialGradientProps extends React.HTMLAttributes<HTMLDivElement> { | ||
/** | ||
* The type of radial gradient | ||
* @default circle | ||
* @type string | ||
*/ | ||
type?: Type | ||
/** | ||
* The color to transition from | ||
* @default #00000000 | ||
* @type string | ||
* */ | ||
from?: string | ||
|
||
/** | ||
* The color to transition to | ||
* @default #290A5C | ||
* @type string | ||
* */ | ||
to?: string | ||
|
||
/** | ||
* The size of the gradient in pixels | ||
* @default 300 | ||
* @type number | ||
* */ | ||
size?: number | ||
|
||
/** | ||
* The origin of the gradient | ||
* @default center | ||
* @type string | ||
* */ | ||
origin?: Origin | ||
} | ||
|
||
export function RadialGradient({ | ||
type = "circle", | ||
from = "hsla(241, 41%, 62%, 0.3)", | ||
to = "hsla(0, 0%, 0%, 0)", | ||
size = 300, | ||
origin = "center", | ||
className, | ||
}: RadialGradientProps) { | ||
const styles: React.CSSProperties = { | ||
position: "absolute", | ||
pointerEvents: "none", | ||
inset: 0, | ||
backgroundImage: `radial-gradient(${type} ${size}px at ${origin}, ${from}, ${to})`, | ||
} | ||
|
||
return <div className={cn(className)} style={styles} /> | ||
} |