@@ -33,7 +33,7 @@ const getDueStyle = (value) => {
33
33
} ;
34
34
35
35
// TODO remove old onClick and Button variant
36
- const DueDate = React . memo ( ( { value, variant, isDisabled, titlePrefix, iconSize, className, onClick } ) => {
36
+ const DueDate = React . memo ( ( { value, variant, isDisabled, titlePrefix, iconSize, isClickable , className, onClick } ) => {
37
37
const [ t ] = useTranslation ( ) ;
38
38
const [ dueStyle , setDueStyle ] = useState ( 'Normal' ) ;
39
39
@@ -51,7 +51,7 @@ const DueDate = React.memo(({ value, variant, isDisabled, titlePrefix, iconSize,
51
51
52
52
const contentNode = value && (
53
53
< span
54
- className = { classNames ( s . wrapper , s [ `wrapper${ upperFirst ( variant ) } ` ] , s [ `due${ dueStyle } ` ] , className ) }
54
+ className = { classNames ( s . wrapper , s [ `wrapper${ upperFirst ( variant ) } ` ] , s [ `due${ dueStyle } ` ] , ( onClick || isClickable ) && s . dueDateHoverable , className ) }
55
55
title = { `${ titlePrefixString } ${ t ( variant === VARIANTS . LIST_VIEW ? `format:dateTime` : `format:date` , { value, postProcess : 'formatDate' } ) } ` }
56
56
>
57
57
{ variant !== VARIANTS . TASKS_CARD && variant !== VARIANTS . LIST_VIEW && t ( `format:date` , { value, postProcess : 'formatDate' } ) }
@@ -75,6 +75,7 @@ DueDate.propTypes = {
75
75
isDisabled : PropTypes . bool ,
76
76
titlePrefix : PropTypes . string ,
77
77
iconSize : PropTypes . oneOf ( Object . values ( IconSize ) ) ,
78
+ isClickable : PropTypes . bool ,
78
79
className : PropTypes . string ,
79
80
onClick : PropTypes . func ,
80
81
} ;
@@ -85,6 +86,7 @@ DueDate.defaultProps = {
85
86
isDisabled : false ,
86
87
titlePrefix : undefined ,
87
88
iconSize : IconSize . Size13 ,
89
+ isClickable : false ,
88
90
className : undefined ,
89
91
onClick : undefined ,
90
92
} ;
0 commit comments