1+ import { Box } from '@chakra-ui/react'
2+
13import { Calendar } from '@/atoms/Icons/Calendar'
24import { Clock } from '@/atoms/Icons/Clock'
3- import { Box } from '@chakra-ui/react'
45import { vars } from '@theme'
5-
66import { NotificationIcon } from './NotificationIcon'
7+ import { Ripples } from '@atoms'
78
89export interface IEventList {
910 hasNotification ?: boolean
@@ -14,6 +15,7 @@ export interface IEventList {
1415 text : string
1516 date : string
1617 hours : string
18+ clickEvent ?: ( ) => void
1719}
1820
1921export const EventsList = ( {
@@ -25,64 +27,79 @@ export const EventsList = ({
2527 text,
2628 date,
2729 hours,
30+ clickEvent,
2831} : IEventList ) : JSX . Element => {
2932 const border = `1px solid ${ vars ( 'colors-neutral-platinum' ) ?? '#E8E8E8' } `
3033
34+ const handleClick = ( ) : void => clickEvent ?.( )
35+
3136 return (
32- < Box className = "eventsList" borderTop = { border } padding = "16px 24px" >
33- < Box display = "flex" flexDirection = "column" gap = "8px" >
34- < Box
35- lineHeight = "21px"
36- display = "flex"
37- justifyContent = "space-between"
38- alignItems = "center"
39- fontSize = "16px"
40- >
41- { name } { hasNotification && < NotificationIcon /> }
42- </ Box >
43- < Box
44- display = "flex"
45- lineHeight = "19px"
46- fontSize = "14px"
47- sx = { {
48- svg : {
49- marginRight : '4px' ,
50- } ,
51- span : {
52- verticalAlign : 'middle' ,
53- } ,
54- } }
55- >
56- < Box paddingRight = "8px" borderRight = { border } >
57- < Calendar />
58- < span > { date } </ span >
37+ < Ripples >
38+ < Box
39+ className = "eventsList"
40+ borderTop = { border }
41+ padding = "16px 24px"
42+ onClick = { handleClick }
43+ cursor = "pointer"
44+ bg = { vars ( 'colors-neutral-white' ) ?? '#fff' }
45+ _hover = { {
46+ bg : vars ( 'colors-neutral-cultured2' ) ?? '#F8F8F8' ,
47+ } }
48+ >
49+ < Box display = "flex" flexDirection = "column" gap = "8px" >
50+ < Box
51+ lineHeight = "21px"
52+ display = "flex"
53+ justifyContent = "space-between"
54+ alignItems = "center"
55+ fontSize = "16px"
56+ >
57+ { name } { hasNotification && < NotificationIcon /> }
5958 </ Box >
60- < Box paddingLeft = "8px" >
61- < Clock />
62- < span > { hours } </ span >
63- </ Box >
64- </ Box >
65- { isDropdown && (
66- < Box display = "flex" alignItems = "center" gap = "4px" lineHeight = "19px" >
67- < Box
68- alignSelf = "flex-start"
69- bg = { color }
70- borderRadius = "50%"
71- display = "block"
72- h = "10px"
73- mt = "4px"
74- maxH = "10px"
75- maxW = "10px"
76- minH = "10px"
77- minW = "10px"
78- w = "10px"
79- />
80- < Box as = "span" color = { vars ( 'colors-neutral-gray' ) ?? '#808080' } fontSize = "14px" >
81- < strong > { text ?? 'Curso' } :</ strong > { courseName }
59+ < Box
60+ display = "flex"
61+ lineHeight = "19px"
62+ fontSize = "14px"
63+ sx = { {
64+ svg : {
65+ marginRight : '4px' ,
66+ } ,
67+ span : {
68+ verticalAlign : 'middle' ,
69+ } ,
70+ } }
71+ >
72+ < Box paddingRight = "8px" borderRight = { border } >
73+ < Calendar />
74+ < span > { date } </ span >
75+ </ Box >
76+ < Box paddingLeft = "8px" >
77+ < Clock />
78+ < span > { hours } </ span >
8279 </ Box >
8380 </ Box >
84- ) }
81+ { isDropdown && (
82+ < Box display = "flex" alignItems = "center" gap = "4px" lineHeight = "19px" >
83+ < Box
84+ alignSelf = "flex-start"
85+ bg = { color }
86+ borderRadius = "50%"
87+ display = "block"
88+ h = "10px"
89+ mt = "4px"
90+ maxH = "10px"
91+ maxW = "10px"
92+ minH = "10px"
93+ minW = "10px"
94+ w = "10px"
95+ />
96+ < Box as = "span" color = { vars ( 'colors-neutral-gray' ) ?? '#808080' } fontSize = "14px" >
97+ < strong > { text ?? 'Curso' } :</ strong > { courseName }
98+ </ Box >
99+ </ Box >
100+ ) }
101+ </ Box >
85102 </ Box >
86- </ Box >
103+ </ Ripples >
87104 )
88105}
0 commit comments