@@ -5,31 +5,34 @@ import { vars } from '@theme'
5
5
6
6
import { NotificationIcon } from './NotificationIcon'
7
7
8
- // Nuevo componente que recibe el texto de día y hora en tres partes
9
8
export interface IEventList {
10
9
color ?: string
11
10
courseName ?: string
12
11
day : string
13
12
date : string
13
+ name : string
14
14
hasNotification ?: boolean
15
- showsCourseName ?: boolean
15
+ showCourse ?: boolean
16
+ showUnit ?: boolean
16
17
time : string
17
- name : string
18
18
text : string
19
19
type : string
20
+ unitName ?: string
20
21
}
21
22
22
23
export const EventsList = ( {
23
24
courseName,
24
25
color,
25
26
day,
26
27
date,
28
+ name,
27
29
hasNotification,
28
- showsCourseName,
30
+ showCourse,
31
+ showUnit,
29
32
time,
30
- name,
31
33
text,
32
34
type,
35
+ unitName,
33
36
} : IEventList ) : JSX . Element => {
34
37
const [ isMobile ] = useMediaQuery ( '(max-width: 580px)' )
35
38
const border = `1px solid ${ vars ( 'colors-neutral-platinum' ) ?? '#E8E8E8' } `
@@ -48,6 +51,14 @@ export const EventsList = ({
48
51
lineHeight : '100%' ,
49
52
}
50
53
54
+ const detailTextStyle = {
55
+ color : vars ( 'colors-neutral-gray' ) ?? '#808080' ,
56
+ fontSize : '14px' ,
57
+ display : 'flex' ,
58
+ gap : '4px' ,
59
+ lineHeight : 'normal' ,
60
+ }
61
+
51
62
return (
52
63
< Box className = "eventsList" borderTop = { border } p = "16px 24px" display = "flex" gap = "12px" >
53
64
{ ! isMobile && (
@@ -75,7 +86,7 @@ export const EventsList = ({
75
86
</ Box >
76
87
) }
77
88
78
- < Box display = "flex" flexDirection = "column" gap = "8px" >
89
+ < Box display = "flex" flexDirection = "column" gap = "8px" w = "100%" >
79
90
< Box
80
91
lineHeight = "21px"
81
92
display = "flex"
@@ -106,23 +117,25 @@ export const EventsList = ({
106
117
</ Box >
107
118
) }
108
119
109
- { showsCourseName && ! initOrEnd && (
110
- < Box display = "flex" gap = "4px" alignItems = "center " >
120
+ { showCourse && ! initOrEnd && (
121
+ < Box display = "flex" gap = "4px" alignItems = "baseline " >
111
122
{ isMobile && < Box height = "10px" width = "10px" bg = { color } borderRadius = "50%" /> }
112
123
113
- < Box
114
- as = "span"
115
- color = { vars ( 'colors-neutral-gray' ) ?? '#808080' }
116
- fontSize = "14px"
117
- display = "flex"
118
- alignItems = "center"
119
- gap = "4px"
120
- lineHeight = "normal"
121
- >
124
+ < Box as = "span" sx = { detailTextStyle } >
122
125
< strong > { text ? `${ text } :` : 'Curso:' } </ strong > { courseName }
123
126
</ Box >
124
127
</ Box >
125
128
) }
129
+
130
+ { showUnit && ! initOrEnd && (
131
+ < Box display = "flex" gap = "4px" alignItems = "baseline" >
132
+ { isMobile && < Box height = "10px" width = "10px" bg = { color } borderRadius = "50%" /> }
133
+
134
+ < Box as = "span" sx = { detailTextStyle } >
135
+ { unitName }
136
+ </ Box >
137
+ </ Box >
138
+ ) }
126
139
</ Box >
127
140
</ Box >
128
141
)
0 commit comments