Skip to content

Commit fcd07aa

Browse files
Merge pull request #67 from drivly/codex/create-onboardstep-component
Add OnboardStep UI component
2 parents 4fa47ab + e4255bd commit fcd07aa

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { type JSX } from 'react'
2+
3+
/**
4+
* Display a single step in an onboarding flow.
5+
*/
6+
export interface OnboardStepProps {
7+
title: string
8+
content: React.ReactNode
9+
className?: string
10+
}
11+
12+
export function OnboardStep({ title, content, className }: OnboardStepProps): JSX.Element {
13+
const base = 'space-y-2 rounded-md border border-gray-200 bg-white p-4'
14+
15+
return (
16+
<section className={[base, className].filter(Boolean).join(' ')}>
17+
<h2 className='text-lg font-semibold'>{title}</h2>
18+
<div className='text-sm'>{content}</div>
19+
</section>
20+
)
21+
}

0 commit comments

Comments
 (0)