@@ -18,37 +18,39 @@ const TopOfPagePlayer = ({
18
18
handlePlayPause,
19
19
} : TopOfPagePlayerProps ) => {
20
20
return (
21
- < div
22
- className = "flex cursor-pointer flex-row items-center gap-2 text-primary hover:text-primary-hover"
23
- onClick = { ( ) => {
24
- if ( startedPlaying ) {
25
- trackCustomEvent ( {
26
- eventCategory : "Audio" ,
27
- eventAction : "click" ,
28
- eventName : "start" ,
29
- } )
30
- }
31
- handlePlayPause ( )
32
- } }
33
- >
34
- { startedPlaying ? (
35
- isPlaying ? (
36
- < PauseCircleIcon className = "h-6 w-6 transition-transform" />
37
- ) : (
38
- < PlayCircleIcon className = "h-6 w-6 transition-transform" />
39
- )
40
- ) : (
41
- < PlayCircleIcon className = "h-6 w-6 transition-transform" />
42
- ) }
43
- < div className = "text-sm text-body-medium" >
21
+ < div className = "inline-block rounded-lg bg-background-low p-2" >
22
+ < div
23
+ className = "flex cursor-pointer flex-row items-center gap-2 text-primary hover:text-primary-hover"
24
+ onClick = { ( ) => {
25
+ if ( startedPlaying ) {
26
+ trackCustomEvent ( {
27
+ eventCategory : "Audio" ,
28
+ eventAction : "click" ,
29
+ eventName : "start" ,
30
+ } )
31
+ }
32
+ handlePlayPause ( )
33
+ } }
34
+ >
44
35
{ startedPlaying ? (
45
- `${ Math . floor ( timeRemaining / 60 ) } :${ String ( Math . floor ( timeRemaining % 60 ) ) . padStart ( 2 , "0" ) } `
36
+ isPlaying ? (
37
+ < PauseCircleIcon className = "h-6 w-6 transition-transform" />
38
+ ) : (
39
+ < PlayCircleIcon className = "h-6 w-6 transition-transform" />
40
+ )
46
41
) : (
47
- < p className = "text-primary hover:text-primary-hover" >
48
- < strong > Listen to this article</ strong > ({ Math . round ( duration / 60 ) } { " " }
49
- min)
50
- </ p >
42
+ < PlayCircleIcon className = "h-6 w-6 transition-transform" />
51
43
) }
44
+ < div className = "text-sm text-body-medium" >
45
+ { startedPlaying ? (
46
+ `${ Math . floor ( timeRemaining / 60 ) } :${ String ( Math . floor ( timeRemaining % 60 ) ) . padStart ( 2 , "0" ) } `
47
+ ) : (
48
+ < p className = "text-primary hover:text-primary-hover" >
49
+ < strong > Listen to this article</ strong > (
50
+ { Math . round ( duration / 60 ) } min)
51
+ </ p >
52
+ ) }
53
+ </ div >
52
54
</ div >
53
55
</ div >
54
56
)
0 commit comments