1
- import { Box } from '@chakra-ui/react'
1
+ import { Calendar } from '@/atoms/Icons/Calendar'
2
+ import { Clock } from '@/atoms/Icons/Clock'
3
+ import { Box , useMediaQuery } from '@chakra-ui/react'
2
4
import { vars } from '@theme'
3
5
4
6
import { NotificationIcon } from './NotificationIcon'
@@ -29,6 +31,7 @@ export const EventsList = ({
29
31
text,
30
32
type,
31
33
} : IEventList ) : JSX . Element => {
34
+ const [ isMobile ] = useMediaQuery ( '(max-width: 580px)' )
32
35
const border = `1px solid ${ vars ( 'colors-neutral-platinum' ) ?? '#E8E8E8' } `
33
36
34
37
const initOrEnd = [
@@ -47,28 +50,30 @@ export const EventsList = ({
47
50
48
51
return (
49
52
< Box className = "eventsList" borderTop = { border } p = "16px 24px" display = "flex" gap = "12px" >
50
- < Box
51
- bg = { color }
52
- minW = "80px"
53
- minH = "80px"
54
- maxW = "80px"
55
- maxH = "80px"
56
- borderRadius = "4px"
57
- p = "8px"
58
- display = "flex"
59
- flexDirection = "column"
60
- justifyContent = "space-around"
61
- >
62
- < Box as = "span" sx = { dateTextStyle } >
63
- { day }
64
- </ Box >
65
- < Box as = "span" sx = { dateTextStyle } >
66
- { date }
67
- </ Box >
68
- < Box as = "span" fontSize = "14px" fontWeight = "700" color = { vars ( 'colors-neutral-white' ) } >
69
- { time }
53
+ { ! isMobile && (
54
+ < Box
55
+ bg = { color }
56
+ minW = "80px"
57
+ minH = "80px"
58
+ maxW = "80px"
59
+ maxH = "80px"
60
+ borderRadius = "4px"
61
+ p = "8px"
62
+ display = "flex"
63
+ flexDirection = "column"
64
+ justifyContent = "space-around"
65
+ >
66
+ < Box as = "span" sx = { dateTextStyle } >
67
+ { day }
68
+ </ Box >
69
+ < Box as = "span" sx = { dateTextStyle } >
70
+ { date }
71
+ </ Box >
72
+ < Box as = "span" fontSize = "14px" fontWeight = "700" color = { vars ( 'colors-neutral-white' ) } >
73
+ { time }
74
+ </ Box >
70
75
</ Box >
71
- </ Box >
76
+ ) }
72
77
73
78
< Box display = "flex" flexDirection = "column" gap = "8px" >
74
79
< Box
@@ -77,13 +82,43 @@ export const EventsList = ({
77
82
justifyContent = "space-between"
78
83
alignItems = "center"
79
84
fontSize = "16px"
80
- fontWeight = " 700"
85
+ fontWeight = { isMobile ? '400' : ' 700' }
81
86
>
82
87
{ name } { hasNotification && < NotificationIcon /> }
83
88
</ Box >
89
+
90
+ { isMobile && (
91
+ < Box lineHeight = "normal" sx = { { '>svg' : { marginRight : '4px' } } } >
92
+ < Calendar />
93
+ < Box
94
+ as = "span"
95
+ verticalAlign = "middle"
96
+ p = "0 8px 0 0"
97
+ borderRight = { `1px solid ${ vars ( 'colors-neutral-platinum' ) } ` }
98
+ mr = "8px"
99
+ >
100
+ { day } { date }
101
+ </ Box >
102
+ < Clock />
103
+ < Box as = "span" verticalAlign = "middle" >
104
+ { time }
105
+ </ Box >
106
+ </ Box >
107
+ ) }
108
+
84
109
{ showsCourseName && ! initOrEnd && (
85
- < Box display = "flex" alignItems = "center" gap = "4px" lineHeight = "19px" >
86
- < Box as = "span" color = { vars ( 'colors-neutral-gray' ) ?? '#808080' } fontSize = "14px" >
110
+ < Box display = "flex" gap = "4px" alignItems = "center" >
111
+ { isMobile && < Box height = "10px" width = "10px" bg = { color } borderRadius = "50%" /> }
112
+
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
+ >
87
122
< strong > { text ? `${ text } :` : 'Curso:' } </ strong > { courseName }
88
123
</ Box >
89
124
</ Box >
0 commit comments