|
20 | 20 |
|
21 | 21 |
|
22 | 22 | def main(view: View):
|
23 |
| - name = view(box('What is your name?', value='Boaty McBoatface'), ['Continue']) |
24 |
| - feel = view(box(f'How do you feel today, {name}?', value='intrigued'), ['Continue']) |
| 23 | + name, _ = view(box('What is your name?', value='Boaty McBoatface'), ['Continue']) |
| 24 | + feel, _ = view(box(f'How do you feel today, {name}?', value='intrigued'), ['Continue']) |
25 | 25 | view(f'What a coincidence, {name}, I feel {feel}, too!')
|
26 | 26 |
|
27 | 27 |
|
@@ -78,15 +78,12 @@ def main(view: View):
|
78 | 78 | box('Open user menu') / 'sr-only',
|
79 | 79 | box(
|
80 | 80 | box('B') / 'text-white text-lg font-light',
|
| 81 | + mode='more', |
| 82 | + options=['Profile', 'Settings', 'Sign Out'], |
81 | 83 | ) / 'flex items-center justify-center h-8 w-8 rounded-full bg-pink-500',
|
| 84 | + mode='input', |
82 | 85 | ) / 'flex rounded-full bg-indigo-600 text-sm text-white focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-indigo-600',
|
83 | 86 | ),
|
84 |
| - # Profile menu |
85 |
| - box( |
86 |
| - box('Profile') / 'block py-2 px-4 text-sm text-gray-700', |
87 |
| - box('Settings') / 'block py-2 px-4 text-sm text-gray-700', |
88 |
| - box('Sign out') / 'block py-2 px-4 text-sm text-gray-700', |
89 |
| - ) / 'absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black focus:outline-none', |
90 | 87 | ) / 'relative ml-3 shrink-0',
|
91 | 88 | ) / 'flex items-center',
|
92 | 89 | ) / 'hidden lg:ml-4 lg:block',
|
|
0 commit comments