forked from rajun/ar-test
feat: add login story steps
This commit is contained in:
parent
34af16d550
commit
16fe80634f
24
app/components/auth/showcase/story-steps.tsx
Normal file
24
app/components/auth/showcase/story-steps.tsx
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { StoryStep } from '~/components/auth/showcase/story-step';
|
||||||
|
import { LOGIN_STORY } from '~/data/auth/constants';
|
||||||
|
import { cn } from '~/lib/utils';
|
||||||
|
|
||||||
|
interface StoryStepsProps {
|
||||||
|
layout: 'card' | 'pill';
|
||||||
|
active: number;
|
||||||
|
cycle: number;
|
||||||
|
onSelect: (step: number) => void;
|
||||||
|
onComplete: () => void;
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function StorySteps({ layout, active, cycle, onSelect, onComplete, className }: StoryStepsProps) {
|
||||||
|
return (
|
||||||
|
<ol className={cn('flex', layout === 'card' ? 'flex-col gap-1' : 'flex-wrap justify-center gap-2', className)}>
|
||||||
|
{LOGIN_STORY.map((step, i) => (
|
||||||
|
<li key={step.number}>
|
||||||
|
<StoryStep step={step} layout={layout} active={i === active} cycle={cycle} onSelect={() => onSelect(i)} onComplete={onComplete} />
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ol>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user