1+ import { Remote , Time } from '@/atoms/Icons'
12import { Box } from '@chakra-ui/react'
23import { vars } from '@theme'
34
@@ -8,6 +9,7 @@ export interface IEventList {
89 courseName ?: string
910 day : string
1011 date : string
12+ duration ?: number
1113 name : string
1214 hasNotification ?: boolean
1315 onClick ?: ( ) => void
@@ -24,6 +26,7 @@ export const EventsList = ({
2426 color,
2527 day,
2628 date,
29+ duration,
2730 name,
2831 hasNotification,
2932 onClick,
@@ -38,6 +41,9 @@ export const EventsList = ({
3841 const hoverBg = vars ( 'colors-neutral-cultured2' ) ?? '#F8F8F8'
3942 const isClickable = Boolean ( onClick )
4043
44+ const showEventDuration =
45+ [ 'online' , 'in-person' ] . includes ( type ) && duration !== undefined && duration > 0
46+
4147 const initOrEnd = [
4248 'end-course' ,
4349 'init-course' ,
@@ -55,11 +61,20 @@ export const EventsList = ({
5561 const detailTextStyle = {
5662 color : vars ( 'colors-neutral-gray' ) ?? '#808080' ,
5763 fontSize : '14px' ,
58- display : 'inline' ,
64+ alignItems : 'center' ,
65+ display : 'flex' ,
5966 gap : '4px' ,
6067 lineHeight : 'normal' ,
6168 }
6269
70+ const eventIconStyle = {
71+ alignItems : 'center' ,
72+ display : 'inline-flex' ,
73+ height : '24px' ,
74+ justifyContent : 'center' ,
75+ minWidth : '16px' ,
76+ }
77+
6378 return (
6479 < Box
6580 className = "eventsList"
@@ -116,7 +131,30 @@ export const EventsList = ({
116131
117132 { showCourse && ! initOrEnd && (
118133 < Box as = "span" sx = { detailTextStyle } >
119- < strong > { text ? `${ text } :` : 'Curso:' } </ strong > { courseName }
134+ { type === 'cv-events' ? < > </ > : < strong > { text ? `${ text } :` : 'Curso:' } </ strong > } { ' ' }
135+ { courseName }
136+ </ Box >
137+ ) }
138+
139+ { showEventDuration && (
140+ < Box display = "flex" flexDirection = "row" gap = "8px" flexWrap = "wrap" >
141+ < Box
142+ as = "span"
143+ sx = { detailTextStyle }
144+ paddingRight = "8px"
145+ borderRight = { `1px solid ${ vars ( 'colors-neutral-platinum' ) } ` }
146+ >
147+ < Box as = "span" sx = { eventIconStyle } >
148+ < Remote color = { vars ( 'colors-main-ziggurat' ) } />
149+ </ Box >
150+ Link clase online
151+ </ Box >
152+ < Box as = "span" sx = { detailTextStyle } >
153+ < Box as = "span" sx = { eventIconStyle } >
154+ < Time color = { vars ( 'colors-main-ziggurat' ) } />
155+ </ Box >
156+ { duration } min
157+ </ Box >
120158 </ Box >
121159 ) }
122160
0 commit comments