@authdog/react-elements 0.0.47 → 0.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -205,7 +205,7 @@ export function Navbar({
205
205
  <DropdownMenuTrigger asChild>
206
206
  <Button
207
207
  variant="ghost"
208
- className="relative h-8 w-8 rounded-full"
208
+ className="relative h-8 w-8 rounded-full cursor-pointer"
209
209
  disabled={isLoading}
210
210
  >
211
211
  <Avatar className="h-8 w-8">
@@ -243,29 +243,33 @@ export function Navbar({
243
243
  </p>
244
244
  </div>
245
245
  </DropdownMenuLabel>
246
- <DropdownMenuSeparator />
247
- <DropdownMenuGroup>
248
- {dropdownMenuItems.map((item, index) => (
249
- <DropdownMenuItem
250
- key={index}
251
- onClick={() => {
252
- if (!item.disabled) {
253
- // Backward compatibility: if it's the profile item and onProfileSelected exists
254
- if (item.uri === "/profile" && onProfileSelected) {
255
- onProfileSelected();
256
- }
257
- onDropdownMenuItemClick(item.uri);
258
- }
259
- }}
260
- disabled={item.disabled}
261
- className="cursor-pointer"
262
- >
263
- {item.icon && <IconWrapper Icon={item.icon} />}
264
- <span>{item.name}</span>
265
- </DropdownMenuItem>
266
- ))}
267
- </DropdownMenuGroup>
268
- <DropdownMenuSeparator />
246
+ {dropdownMenuItems.length > 0 && (
247
+ <>
248
+ <DropdownMenuSeparator />
249
+ <DropdownMenuGroup>
250
+ {dropdownMenuItems.map((item, index) => (
251
+ <DropdownMenuItem
252
+ key={index}
253
+ onClick={() => {
254
+ if (!item.disabled) {
255
+ // Backward compatibility: if it's the profile item and onProfileSelected exists
256
+ if (item.uri === "/profile" && onProfileSelected) {
257
+ onProfileSelected();
258
+ }
259
+ onDropdownMenuItemClick(item.uri);
260
+ }
261
+ }}
262
+ disabled={item.disabled}
263
+ className="cursor-pointer"
264
+ >
265
+ {item.icon && <IconWrapper Icon={item.icon} />}
266
+ <span>{item.name}</span>
267
+ </DropdownMenuItem>
268
+ ))}
269
+ </DropdownMenuGroup>
270
+ <DropdownMenuSeparator />
271
+ </>
272
+ )}
269
273
  <DropdownMenuItem onClick={onLogout} className="cursor-pointer">
270
274
  <IconWrapper Icon={LogOut} />
271
275
  <span>Log out</span>
@@ -46,6 +46,7 @@ export const ThemeToggle = () => {
46
46
  <Button
47
47
  variant="ghost"
48
48
  size="icon"
49
+ className="cursor-pointer"
49
50
  aria-label={mode === "dark" ? "Switch to light theme" : "Switch to dark theme"}
50
51
  onClick={toggle}
51
52
  >