import React, { Fragment } from 'react'; import { LoopStep } from '../../lib/onboarding-chain/content'; import { GRADIENT, MONO } from '../signup-mirror/theme'; const STAGGER = 0.26; function ChainArrow({ index }: { index: number }): JSX.Element { return (
); } function ChainBox({ step, index, }: { step: LoopStep; index: number; }): JSX.Element { const boxIn = `rcm-boxin .6s cubic-bezier(.22,.7,.25,1) ${(index * STAGGER).toFixed(2)}s both`; const animation = step.lead ? `${boxIn}, rcm-box1glow 1.2s ease-out ${(index * STAGGER + 0.1).toFixed(2)}s both` : boxIn; const layout = 'flex-none w-full max-w-[520px] mx-auto flex flex-col min-w-0 rounded-[14px] p-[22px_20px] min-[940px]:flex-1 min-[940px]:max-w-none min-[940px]:mx-0'; const leadStyle = step.lead ? { background: 'linear-gradient(#ffffff,#ffffff) padding-box, linear-gradient(135deg,#C8175D,#7B3FE4) border-box', border: '1.5px solid transparent', boxShadow: '0 0 30px -10px rgba(200,23,93,.22),0 0 64px -8px rgba(123,63,228,.12)', } : {}; return (
Step {step.n} ยท {step.phase}

{step.title}

{step.lead && ( )}

{step.body}

{step.footer}
); } export function LoopChain({ steps }: { steps: LoopStep[] }): JSX.Element { return (
{steps.map((step, index) => ( {index < steps.length - 1 && } ))}
); }