UserMenu

App

Avatar + isim + rol gösteren trigger'a tıklayınca açılan kullanıcı dropdown'ı. SafeUser prop'u alır; dropdown başlığında isim ve e-posta görünür.

Varsayılan (isim + e-posta + rol)

Preview
Code
<UserMenu
  user={{
    userId: 'u1',
    email: 'jane@acme.com',
    userRole: 'Admin',
    userStatus: 'ACTIVE',
    userPreferences: null,
    userProfile: { name: 'Jane Doe', profilePicture: null },
  }}
/>

Özel items

Preview
Code
<UserMenu
  user={currentUser}
  items={[
    { label: 'View Profile',  icon: '👤', onClick: () => {} },
    { label: 'Billing',       icon: '💳', onClick: () => {} },
    { type: 'separator' },
    { label: 'Sign out',      icon: '↩️', danger: true, onClick: () => {} },
  ]}
/>
Sourcemodules/app/UserMenu.tsx