Skip to content

Commit b8fdd54

Browse files
committed
feat: migrate media icons to Lucide
fix: custom autoplay.svg
1 parent 6dea33e commit b8fdd54

File tree

9 files changed

+38
-55
lines changed

9 files changed

+38
-55
lines changed

src/components/ListenToPlayer/PlayerWidget/index.tsx

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import { useCallback, useEffect, useRef, useState } from "react"
2-
import { X } from "lucide-react"
3-
42
import {
5-
ArrowIcon,
6-
AutoplayIcon,
7-
CollapseIcon,
8-
ExpandIcon,
9-
PauseCircleIcon,
10-
PlayCircleIcon,
11-
} from "@/components/icons/listen-to"
3+
CirclePause,
4+
CirclePlay,
5+
Maximize2,
6+
Minimize2,
7+
SkipBack,
8+
SkipForward,
9+
X,
10+
} from "lucide-react"
11+
12+
import AutoplayIcon from "@/components/icons/listen-to/autoplay.svg"
1213
import Tooltip from "@/components/Tooltip"
1314

1415
import { cn } from "@/lib/utils/cn"
@@ -159,7 +160,7 @@ const PlayerWidget = ({
159160
})
160161
}}
161162
>
162-
<CollapseIcon />
163+
<Minimize2 className="stroke-1" />
163164
</button>
164165
</Tooltip>
165166
</div>
@@ -228,17 +229,21 @@ const PlayerWidget = ({
228229
title="Previous"
229230
aria-label={"Previous"}
230231
>
231-
<ArrowIcon />
232+
<SkipBack className="stroke-[1.5]" />
232233
</button>
233234
</PlayerButton>
234235
<PlayerButton tooltipContent={isPlaying ? "Pause" : "Play"}>
235236
<button
236-
className="cursor-pointer text-[32px] text-primary hover:text-primary-hover"
237+
className="text-//[32px] cursor-pointer text-primary hover:text-primary-hover"
237238
onClick={handlePlayPause}
238239
title={isPlaying ? "Pause" : "Play"}
239240
aria-label={isPlaying ? "Pause" : "Play"}
240241
>
241-
{isPlaying ? <PauseCircleIcon /> : <PlayCircleIcon />}
242+
{isPlaying ? (
243+
<CirclePause className="size-8 stroke-[1.5]" />
244+
) : (
245+
<CirclePlay className="size-8 stroke-[1.5]" />
246+
)}
242247
</button>
243248
</PlayerButton>
244249
<PlayerButton tooltipContent={"Next"}>
@@ -253,7 +258,7 @@ const PlayerWidget = ({
253258
title="Next"
254259
aria-label={"Next"}
255260
>
256-
<ArrowIcon className="rotate-180" />
261+
<SkipForward className="stroke-[1.5]" />
257262
</button>
258263
</PlayerButton>
259264
<PlayerButton
@@ -284,12 +289,16 @@ const PlayerWidget = ({
284289
<div className="flex flex-row items-center gap-2">
285290
<PlayerButton tooltipContent={isPlaying ? "Pause" : "Play"}>
286291
<button
287-
className="cursor-pointer text-[32px] text-primary hover:text-primary-hover"
292+
className="cursor-pointer text-primary ring hover:text-primary-hover"
288293
onClick={handlePlayPause}
289294
title={isPlaying ? "Pause" : "Play"}
290295
aria-label={isPlaying ? "Pause" : "Play"}
291296
>
292-
{isPlaying ? <PauseCircleIcon /> : <PlayCircleIcon />}
297+
{isPlaying ? (
298+
<CirclePause className="size-8" />
299+
) : (
300+
<CirclePlay className="size-8" />
301+
)}
293302
</button>
294303
</PlayerButton>
295304
<div className="text-sm text-body-medium">
@@ -311,7 +320,7 @@ const PlayerWidget = ({
311320
})
312321
}}
313322
>
314-
<ExpandIcon />
323+
<Maximize2 className="stroke-1" />
315324
</button>
316325
</PlayerButton>
317326
<PlayerButton tooltipContent={"Close"}>
@@ -324,7 +333,7 @@ const PlayerWidget = ({
324333
handleCloseWidget()
325334
}}
326335
>
327-
<X />
336+
<X className="stroke-[1.5]" />
328337
</button>
329338
</PlayerButton>
330339
</div>

src/components/ListenToPlayer/TopOfPagePlayer/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { PauseCircleIcon, PlayCircleIcon } from "@/components/icons/listen-to"
1+
import { CirclePause, CirclePlay } from "lucide-react"
2+
23
import { Button } from "@/components/ui/buttons/Button"
34

45
import { trackCustomEvent } from "@/lib/utils/matomo"
@@ -36,12 +37,12 @@ const TopOfPagePlayer = ({
3637
<div className="flex flex-row items-center gap-2 text-primary hover:text-primary-hover">
3738
{startedPlaying ? (
3839
isPlaying ? (
39-
<PauseCircleIcon className="h-6 w-6 transition-transform" />
40+
<CirclePause />
4041
) : (
41-
<PlayCircleIcon className="h-6 w-6 transition-transform" />
42+
<CirclePlay />
4243
)
4344
) : (
44-
<PlayCircleIcon className="h-6 w-6 transition-transform" />
45+
<CirclePlay />
4546
)}
4647
<div className="text-sm text-body-medium">
4748
{startedPlaying ? (

src/components/icons/listen-to/arrow.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 6 additions & 3 deletions
Loading

src/components/icons/listen-to/collapse.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/components/icons/listen-to/expand.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/components/icons/listen-to/index.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/components/icons/listen-to/pause-circle.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/components/icons/listen-to/play-circle.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)