@@ -17,6 +17,7 @@ import {
1717 Users
1818} from 'lucide-react' ;
1919import Link from 'next/link' ;
20+ import config from '../../../../config' ;
2021import type { DropdownMenuCheckboxProps , DropdownMenuProps , DropdownMenuRadioProps } from 'soybean-react-ui' ;
2122import { toast } from 'soybean-react-ui' ;
2223
@@ -30,7 +31,7 @@ export const menus: DropdownMenuProps['items'] = [
3031 } ,
3132 {
3233 label : 'Profile' ,
33- leading : < User className = "shrink-0 text-muted-foreground " /> ,
34+ leading : < User className = "text-primary " /> ,
3435 onClick : ( ) => {
3536 toast . success ( 'Profile' , {
3637 description : 'Profile' ,
@@ -40,212 +41,98 @@ export const menus: DropdownMenuProps['items'] = [
4041 } ,
4142 shortcut : [ 'command' , 'shift' , 'p' ]
4243 } ,
43- { label : 'Billing' , leading : < CreditCard className = "shrink-0 text-muted-foreground" /> , shortcut : [ 'command' , 'b' ] } ,
44- { label : 'Settings' , leading : < Settings className = "shrink-0 text-muted-foreground" /> , shortcut : [ 'command' , 's' ] } ,
44+ { label : 'Billing' , leading : < CreditCard /> , shortcut : [ 'command' , 'b' ] } ,
45+ { label : 'Settings' , leading : < Settings /> , shortcut : [ 'command' , 's' ] } ,
4546 {
4647 label : 'Keyboard shortcuts' ,
47- leading : < Keyboard className = "shrink-0 text-muted-foreground" /> ,
48+ leading : < Keyboard /> ,
4849 shortcut : [ 'command' , 'k' ]
4950 } ,
5051 { type : 'separator' } ,
51- { label : 'Team' , leading : < Users className = "shrink-0 text-muted-foreground" /> , shortcut : [ 'command' , 'shift' , 't' ] } ,
52+ { label : 'Team' , leading : < Users /> , shortcut : [ 'command' , 'shift' , 't' ] } ,
5253 {
5354 label : (
5455 < Link
55- href = "https://github.com"
56+ href = { config . githubUrl }
5657 target = "_blank"
5758 >
5859 Github
5960 </ Link >
6061 ) ,
61- leading : < Github className = "shrink-0 text-muted-foreground" /> ,
62+ leading : < Github /> ,
6263 trailing : < ArrowUpRight className = "shrink-0 self-start text-muted-foreground size-3 -ml-2" />
6364 } ,
6465 {
6566 children : [
6667 {
6768 label : 'Email' ,
68- leading : < Mail className = "shrink-0 text-muted-foreground" /> ,
69+ leading : < Mail /> ,
6970 shortcut : [ 'command' , 'shift' , 'e' ]
7071 } ,
7172 {
7273 label : 'Facebook' ,
73- leading : < Facebook className = "shrink-0 text-muted-foreground" /> ,
74+ leading : < Facebook /> ,
7475 shortcut : [ 'command' , 'shift' , 'f' ]
7576 } ,
7677 {
7778 label : 'Twitter' ,
78- leading : < Twitter className = "shrink-0 text-muted-foreground" /> ,
79+ leading : < Twitter /> ,
7980 shortcut : [ 'command' , 'shift' , 't' ]
8081 } ,
8182 {
8283 children : [
8384 {
8485 label : 'Message' ,
85- leading : < MessageCircle className = "shrink-0 text-muted-foreground" /> ,
86+ leading : < MessageCircle /> ,
8687 shortcut : [ 'command' , 'm' ]
8788 }
8889 ] ,
8990 label : 'More' ,
90- leading : < CirclePlus className = "shrink-0 text-muted-foreground" /> ,
91+ leading : < CirclePlus /> ,
9192 type : 'sub'
9293 }
9394 ] ,
9495 label : 'Invite Users' ,
95- leading : < UserPlus className = "shrink-0 text-muted-foreground" /> ,
96+ leading : < UserPlus /> ,
9697 type : 'sub'
9798 } ,
9899 {
99100 type : 'separator'
100101 } ,
101- { label : 'Support' , leading : < LifeBuoy className = "shrink-0 text-muted-foreground" /> } ,
102- { disabled : true , label : 'API' , leading : < Cloud className = "shrink-0 text-muted-foreground" /> } ,
102+ { label : 'Support' , leading : < LifeBuoy /> } ,
103+ { disabled : true , label : 'API' , leading : < Cloud /> } ,
103104 { type : 'separator' } ,
104105 {
105106 label : 'Sign out' ,
106- leading : < LogOut className = "shrink-0 text-muted-foreground" /> ,
107+ leading : < LogOut /> ,
107108 shortcut : [ 'command' , 'shift' , 'Q' ]
108109 }
109110] ;
110111
111112export const menus2 : DropdownMenuCheckboxProps [ 'items' ] = [
112- {
113- label : 'My Account' ,
114- type : 'label'
115- } ,
116- {
117- type : 'separator'
118- } ,
119- {
120- label : 'Profile' ,
121- leading : < User className = "shrink-0 text-muted-foreground" /> ,
122- shortcut : [ 'command' , 'shift' , 'p' ] ,
123- textValue : '01'
124- } ,
125- {
126- label : 'Billing' ,
127- leading : < CreditCard className = "shrink-0 text-muted-foreground" /> ,
128- shortcut : [ 'command' , 'b' ] ,
129- textValue : '02'
130- } ,
131- {
132- label : 'Settings' ,
133- leading : < Settings className = "shrink-0 text-muted-foreground" /> ,
134- shortcut : [ 'command' , 's' ] ,
135- textValue : '03'
136- } ,
137- {
138- label : 'Keyboard shortcuts' ,
139- leading : < Keyboard className = "shrink-0 text-muted-foreground" /> ,
140- shortcut : [ 'command' , 'k' ] ,
141- textValue : '04'
142- } ,
113+ { type : 'label' , label : 'My Account' } ,
143114 { type : 'separator' } ,
144- {
145- label : 'Team' ,
146- leading : < Users className = "shrink-0 text-muted-foreground" /> ,
147- shortcut : [ 'command' , 'shift' , 't' ] ,
148- textValue : '05'
149- } ,
150- {
151- label : (
152- < Link
153- href = "https://github.com"
154- target = "_blank"
155- >
156- Github
157- </ Link >
158- ) ,
159- leading : < Github className = "shrink-0 text-muted-foreground" /> ,
160- textValue : '06' ,
161- trailing : < ArrowUpRight className = "shrink-0 self-start text-muted-foreground size-3 -ml-2" />
162- } ,
163- {
164- label : 'Invite Users' ,
165- leading : < UserPlus className = "shrink-0 text-muted-foreground" /> ,
166- textValue : '07'
167- } ,
168- {
169- type : 'separator'
170- } ,
171- { label : 'Support' , leading : < LifeBuoy className = "shrink-0 text-muted-foreground" /> , textValue : '08' } ,
172- { disabled : true , label : 'API' , leading : < Cloud className = "shrink-0 text-muted-foreground" /> , textValue : '09' } ,
115+ { label : 'Profile' , leading : < User /> , shortcut : '⇧⌘P' , textValue : 'Profile' } ,
116+ { label : 'Billing' , leading : < CreditCard /> , shortcut : '⌘B' , textValue : 'Billing' } ,
173117 { type : 'separator' } ,
174- {
175- label : 'Sign out' ,
176- leading : < LogOut className = "shrink-0 text-muted-foreground" /> ,
177- shortcut : [ 'command' , 'shift' , 'Q' ] ,
178- textValue : '10'
179- }
118+ { label : 'Settings' , leading : < Settings /> , shortcut : '⌘S' , textValue : 'Settings' } ,
119+ { type : 'separator' } ,
120+ { label : 'Keyboard shortcuts' , leading : < Keyboard /> , shortcut : '⌘K' , textValue : 'Keyboard shortcuts' }
180121] ;
181122
182123export const menus3 : DropdownMenuRadioProps [ 'items' ] = [
183- {
184- label : 'My Account' ,
185- type : 'label'
186- } ,
187- {
188- type : 'separator'
189- } ,
190- {
191- label : 'Profile' ,
192- leading : < User className = "shrink-0 text-muted-foreground" /> ,
193- shortcut : [ 'command' , 'shift' , 'p' ] ,
194- value : '01'
195- } ,
196- {
197- label : 'Billing' ,
198- leading : < CreditCard className = "shrink-0 text-muted-foreground" /> ,
199- shortcut : [ 'command' , 'b' ] ,
200- value : '02'
201- } ,
202- {
203- label : 'Settings' ,
204- leading : < Settings className = "shrink-0 text-muted-foreground" /> ,
205- shortcut : [ 'command' , 's' ] ,
206- value : '03'
207- } ,
208- {
209- label : 'Keyboard shortcuts' ,
210- leading : < Keyboard className = "shrink-0 text-muted-foreground" /> ,
211- shortcut : [ 'command' , 'k' ] ,
212- value : '04'
213- } ,
214- { type : 'separator' } ,
215- {
216- label : 'Team' ,
217- leading : < Users className = "shrink-0 text-muted-foreground" /> ,
218- shortcut : [ 'command' , 'shift' , 't' ] ,
219- value : '05'
220- } ,
221- {
222- label : (
223- < Link
224- href = "https://github.com"
225- target = "_blank"
226- >
227- Github
228- </ Link >
229- ) ,
230- leading : < Github className = "shrink-0 text-muted-foreground" /> ,
231- trailing : < ArrowUpRight className = "shrink-0 self-start text-muted-foreground size-3 -ml-2" /> ,
232- value : '06'
233- } ,
234- {
235- label : 'Invite Users' ,
236- leading : < UserPlus className = "shrink-0 text-muted-foreground" /> ,
237- value : '07'
238- } ,
239- {
240- type : 'separator'
241- } ,
242- { label : 'Support' , leading : < LifeBuoy className = "shrink-0 text-muted-foreground" /> , value : '08' } ,
243- { disabled : true , label : 'API' , leading : < Cloud className = "shrink-0 text-muted-foreground" /> , value : '09' } ,
124+ { type : 'label' , label : 'Tooltip Placement' } ,
244125 { type : 'separator' } ,
245- {
246- label : 'Sign out' ,
247- leading : < LogOut className = "shrink-0 text-muted-foreground" /> ,
248- shortcut : [ 'command' , 'shift' , 'Q' ] ,
249- value : '10'
250- }
126+ { value : 'top-start' , label : 'Top Start' } ,
127+ { value : 'top' , label : 'Top' } ,
128+ { value : 'top-end' , label : 'Top End' } ,
129+ { value : 'right-start' , label : 'Right Start' } ,
130+ { value : 'right' , label : 'Right' } ,
131+ { value : 'right-end' , label : 'Right End' } ,
132+ { value : 'bottom-start' , label : 'Bottom Start' } ,
133+ { value : 'bottom' , label : 'Bottom' } ,
134+ { value : 'bottom-end' , label : 'Bottom End' } ,
135+ { value : 'left-start' , label : 'Left Start' } ,
136+ { value : 'left' , label : 'Left' } ,
137+ { value : 'left-end' , label : 'Left End' }
251138] ;
0 commit comments