From 34af16d550a85576a5b9f41cdf202e549e46befe Mon Sep 17 00:00:00 2001 From: rajun Date: Tue, 27 Oct 2026 16:28:57 +0530 Subject: [PATCH] feat: add login story step --- app/components/auth/showcase/story-step.tsx | 61 +++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 app/components/auth/showcase/story-step.tsx diff --git a/app/components/auth/showcase/story-step.tsx b/app/components/auth/showcase/story-step.tsx new file mode 100644 index 0000000..bf22a69 --- /dev/null +++ b/app/components/auth/showcase/story-step.tsx @@ -0,0 +1,61 @@ +import { cva } from 'class-variance-authority'; +import { Text } from '~/components/ui/text'; +import { LOGIN_STORY_STEP_MS, type LoginStoryStep } from '~/data/auth/constants'; +import { cn } from '~/lib/utils'; + +const shell = cva('relative flex cursor-pointer overflow-hidden text-left ring-1 ring-inset transition-colors duration-200', { + variants: { + layout: { + card: 'w-full gap-4 rounded-card-sm px-4 pt-3.5 pb-4 hover:bg-surface-dialog', + pill: 'h-[38px] items-center gap-2 whitespace-nowrap rounded-full px-3.5', + }, + active: { true: 'bg-surface', false: '' }, + }, + compoundVariants: [ + { layout: 'card', active: true, className: 'ring-border-dialog' }, + { layout: 'card', active: false, className: 'ring-transparent' }, + { layout: 'pill', active: true, className: 'ring-border-control' }, + { layout: 'pill', active: false, className: 'ring-border-divider' }, + ], +}); + +interface StoryStepProps { + step: LoginStoryStep; + // card: number, title and description (wide layout); pill: number and title + layout: 'card' | 'pill'; + active: boolean; + // Restarts the progress bar + cycle: number; + onSelect: () => void; + onComplete: () => void; +} + +export function StoryStep({ step, layout, active, cycle, onSelect, onComplete }: StoryStepProps) { + const card = layout === 'card'; + return ( + + ); +}