|
4 | 4 | * Source: Figma "Incubator-design-file" › node 350:504 "Input" |
5 | 5 | * |
6 | 6 | * A centred modal card for collecting initial user profile information: |
7 | | - * • Greeting — "Hi {name}!" centred at the top |
| 7 | + * • Greeting — "Hi {userName}!" centred at the top; falls back to "Hi there!" |
8 | 8 | * • Major field — styled dropdown trigger (flex-1) |
9 | 9 | * • Grad Year field — styled dropdown trigger (shrink-0, content-width) |
10 | 10 | * • Minor field — optional, styled dropdown trigger (full-width) |
@@ -86,7 +86,7 @@ const BODY2_REGULAR = |
86 | 86 | // ─── Public types ───────────────────────────────────────────────────────────── |
87 | 87 |
|
88 | 88 | export interface ProfileProps extends ComponentPropsWithoutRef<'div'> { |
89 | | - /** First name shown in the greeting, e.g. "Megan" → "Hi Megan!". */ |
| 89 | + /** First name shown in the greeting, e.g. "Alex" → "Hi Alex!". Falls back to "Hi there!" when omitted. */ |
90 | 90 | userName?: string; |
91 | 91 |
|
92 | 92 | // ── Major ── |
@@ -190,18 +190,18 @@ function ProfileSelectField({ |
190 | 190 | * │ Hi {userName}! │ ← greeting, centred |
191 | 191 | * │ │ |
192 | 192 | * │ Major ──────────────── Grad Year │ ← side-by-side, major flex-1 |
193 | | - * │ [ Computer Science ▾ ] [2026▾]│ |
| 193 | + * │ [ Select major ▾ ] [Year▾]│ |
194 | 194 | * │ │ |
195 | 195 | * │ Minor (optional) │ |
196 | | - * │ [ Linguistics ▾ ] │ |
| 196 | + * │ [ Select minor ▾ ] │ |
197 | 197 | * │ │ |
198 | 198 | * │ Interests │ |
199 | 199 | * │ [Internships] [Early Career] [Tech] │ |
200 | 200 | * │ [+] │ |
201 | 201 | * └──────────────────────────────────────┘ |
202 | 202 | */ |
203 | 203 | export function Profile({ |
204 | | - userName = 'Megan', |
| 204 | + userName, |
205 | 205 | major, |
206 | 206 | onMajorChange, |
207 | 207 | gradYear, |
@@ -278,7 +278,7 @@ export function Profile({ |
278 | 278 | } |
279 | 279 | style={{ fontVariationSettings: "'opsz' 14" }} |
280 | 280 | > |
281 | | - Hi {userName}! |
| 281 | + {userName ? `Hi ${userName}!` : 'Hi there!'} |
282 | 282 | </h2> |
283 | 283 | </div> |
284 | 284 |
|
|
0 commit comments