8
8
injectIntl ,
9
9
intlShape ,
10
10
} from '@edx/frontend-platform/i18n' ;
11
- import { Tooltip , OverlayTrigger } from '@openedx/paragon' ;
11
+ import {
12
+ Tooltip , OverlayTrigger , breakpoints , useWindowSize ,
13
+ } from '@openedx/paragon' ;
12
14
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons' ;
13
15
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' ;
14
16
@@ -30,6 +32,7 @@ const Day = ({
30
32
const {
31
33
userTimezone,
32
34
} = useModel ( 'courseHomeMeta' , courseId ) ;
35
+ const wideScreen = useWindowSize ( ) . width >= breakpoints . medium . minWidth ;
33
36
34
37
const timezoneFormatArgs = userTimezone ? { timeZone : userTimezone } : { } ;
35
38
@@ -69,9 +72,13 @@ const Day = ({
69
72
const textColor = available ? 'text-primary-700' : 'text-gray-500' ;
70
73
71
74
return (
72
- < div key = { item . title + item . date } className = { classNames ( textColor , 'small pb-1' ) } data-testid = "dates-item" >
75
+ < div
76
+ key = { item . title + item . date }
77
+ className = { classNames ( textColor , 'pb-1' , { small : ! wideScreen } ) }
78
+ data-testid = "dates-item"
79
+ >
73
80
< div >
74
- < span className = " small" >
81
+ < span className = { classNames ( { small : ! wideScreen } ) } >
75
82
< span className = "font-weight-bold" > { item . assignmentType && `${ item . assignmentType } : ` } { title } </ span >
76
83
{ showDueDateTime && (
77
84
< span >
@@ -96,7 +103,11 @@ const Day = ({
96
103
</ OverlayTrigger >
97
104
) }
98
105
</ div >
99
- { item . description && < div className = "small mb-2" > { item . description } </ div > }
106
+ { item . description && (
107
+ < div className = { classNames ( 'mb-2' , { small : ! wideScreen } ) } >
108
+ { item . description }
109
+ </ div >
110
+ ) }
100
111
</ div >
101
112
) ;
102
113
} ) }
0 commit comments