@taruvi/navkit 0.0.24 → 0.0.26

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taruvi/navkit",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "main": "src/App.tsx",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/App.tsx CHANGED
@@ -37,7 +37,7 @@ const NavkitContent = () => {
37
37
  {appSettings?.icon ? <Box component="img" src={appSettings?.icon} sx={styles.logo} /> : <></>}
38
38
  {appSettings?.displayName &&
39
39
  <Typography sx={styles.appName}>
40
- {appSettings.displayName.length > 15 ? `${appSettings.displayName.substring(0, 15)}...` : appSettings.displayName}
40
+ {appSettings.displayName.length > 40 ? `${appSettings.displayName.substring(0, 40)}...` : appSettings.displayName}
41
41
  </Typography>
42
42
  }
43
43
  </Box>
@@ -31,7 +31,7 @@ export const profileStyles = {
31
31
  position: 'absolute' as const,
32
32
  top: 60,
33
33
  right: 0,
34
- width: 200,
34
+ width: 250,
35
35
  borderRadius: borderRadius.default,
36
36
  boxShadow: shadows.dropdown,
37
37
  backgroundColor: colours.bg.white,
@@ -92,7 +92,7 @@ export const getProfileStyles = (mode: ThemeMode) => {
92
92
  position: 'absolute' as const,
93
93
  top: 60,
94
94
  right: 0,
95
- width: 200,
95
+ width: 250,
96
96
  borderRadius: borderRadius.default,
97
97
  boxShadow: themeShadows.dropdown,
98
98
  backgroundColor: colors.bg.white,
@@ -1,4 +1,4 @@
1
- import { Box, Card, Divider, MenuItem, Typography } from '@mui/material'
1
+ import { Avatar, Box, Card, Divider, MenuItem, Typography } from '@mui/material'
2
2
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
3
3
  import DarkModeOutlined from '@mui/icons-material/DarkModeOutlined'
4
4
  import LightModeOutlined from '@mui/icons-material/LightModeOutlined'
@@ -19,7 +19,10 @@ const ProfileMenu = () => {
19
19
 
20
20
  return (
21
21
  <Card sx={styles.menu}>
22
- <Box sx={{ px: 2, py: 1.5 }}>
22
+ <Box sx={{ px: 2, py: 1.5, display: 'flex', alignItems: 'center', gap: 1.5 }}>
23
+ {userData?.icon_url && (
24
+ <Avatar src={userData.icon_url} sx={{ width: 32, height: 32, maxWidth: 32, borderRadius: '50%' }} />
25
+ )}
23
26
  <Typography sx={{ fontWeight: 600, color: styles.menuItemText.color }}>
24
27
  {userData?.full_name}
25
28
  </Typography>
package/src/types.ts CHANGED
@@ -25,6 +25,7 @@ export interface UserData {
25
25
  last_name?: string
26
26
  full_name?: string
27
27
  pfp?: string
28
+ icon_url?: string
28
29
  is_active?: boolean
29
30
  is_staff?: boolean
30
31
  is_superuser?: boolean