Skip to content

Commit 877a0a1

Browse files
fix(audio-player): use rh icon scrubbers (#2469)
* fix(audio-player): replace svg with rh-icon * chore(audio-player): add changeset * chore(audio-player): typo Co-authored-by: Benny Powers - עם ישראל חי! <[email protected]> --------- Co-authored-by: Benny Powers - עם ישראל חי! <[email protected]>
1 parent ed3380f commit 877a0a1

File tree

3 files changed

+12
-22
lines changed

3 files changed

+12
-22
lines changed

.changeset/red-chicken-say.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@rhds/elements": patch
3+
---
4+
5+
`<rh-audio-player>`: corrected icons for rewind and fast forward
6+

elements/rh-audio-player/rh-audio-player.css

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,8 @@ rh-audio-player-rate-stepper {
104104
width: auto;
105105
}
106106

107-
svg.scrubber {
108-
fill: var(--_text-color);
109-
height: var(--_svg-size);
110-
width: var(--_svg-size);
107+
.scrubber {
108+
color: var(--_text-color);
111109
padding: var(--_icon-padding);
112110
}
113111

@@ -330,8 +328,8 @@ input[type='range'] {
330328
#play-tooltip {
331329
margin: 0;
332330

333-
--_icon-gap: 16px;
334-
--rh-icon-size: 18px;
331+
--_icon-gap: var(--rh-space-lg, 16px);
332+
--rh-icon-size: var(--rh-size-icon-01, 16px);
335333
}
336334

337335
#full-play-tooltip {

elements/rh-audio-player/rh-audio-player.ts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -484,14 +484,7 @@ export class RhAudioPlayer extends LitElement {
484484
class="toolbar-button"
485485
?disabled=${rewinddisabled}
486486
@click=${() => this.rewind()}>
487-
<svg xmlns="http://www.w3.org/2000/svg"
488-
viewBox="0 0 32 32"
489-
class="scrubber"
490-
role="presentation">
491-
<path d="M10.4,19.5h1.8v-5l-1.8,0.8v-1l2.2-0.9h0.7v6.2h1.9v1h-4.8V19.5z"/>
492-
<path d="M16.4,19.6l0.7-0.8c0.6,0.5,1.2,0.8,1.9,0.8c0.9,0,1.5-0.6,1.5-1.4c0-0.8-0.6-1.3-1.5-1.3 c-0.5,0-0.9,0.1-1.4,0.4L16.8,17l0.2-3.7h4.3v1h-3.3l-0.1,2c0.5-0.2,1-0.3,1.5-0.3c1.4,0,2.4,0.9,2.4,2.1c0,1.4-1.1,2.4-2.7,2.4 C18,20.5,17.1,20.2,16.4,19.6z"/>
493-
<path d="M4,6.6L9.5,2v3.7h7.4c6.1,0,11.1,5,11.1,11.1c0,6.1-5,11.1-11.1,11.1H9.5V26h1.8h5.5 c5.1,0,9.2-4.1,9.2-9.2c0-5.1-4.1-9.2-9.2-9.2h-5.5H9.5v3.7L4,6.6z"/>
494-
</svg>
487+
<rh-icon set="ui" icon="undo" class="scrubber"></rh-icon>
495488
</button>
496489
<span slot="content">${this.#translation.get('rewind')}</span>
497490
</rh-tooltip>
@@ -514,14 +507,7 @@ export class RhAudioPlayer extends LitElement {
514507
class="toolbar-button"
515508
?disabled=${forwarddisabled}
516509
@click=${() => this.forward()}>
517-
<svg xmlns="http://www.w3.org/2000/svg"
518-
viewBox="0 0 32 32"
519-
class="scrubber"
520-
role="presentation">
521-
<path d="M10.4,19.5h1.8v-5l-1.8,0.8v-1l2.2-0.9h0.7v6.2h1.9v1h-4.8V19.5z"/>
522-
<path d="M16.4,19.6l0.7-0.8c0.6,0.5,1.2,0.8,1.9,0.8c0.9,0,1.5-0.6,1.5-1.4c0-0.8-0.6-1.3-1.5-1.3 c-0.5,0-0.9,0.1-1.4,0.4L16.8,17l0.2-3.7h4.3v1h-3.3l-0.1,2c0.5-0.2,1-0.3,1.5-0.3c1.4,0,2.4,0.9,2.4,2.1c0,1.4-1.1,2.4-2.7,2.4 C18,20.5,17.1,20.2,16.4,19.6z"/>
523-
<path d="M28,6.6L22.4,2v3.7h-7.4C9,5.7,4,10.6,4,16.7c0,6.1,5,11.1,11.1,11.1h7.4V26h-1.8h-5.5c-5.1,0-9.2-4.1-9.2-9.2 c0-5.1,4.1-9.2,9.2-9.2h5.5h1.8v3.7L28,6.6z"/>
524-
</svg>
510+
<rh-icon set="ui" icon="redo" class="scrubber"></rh-icon>
525511
</button>
526512
<span slot="content">${this.#translation.get('advance')}</span>
527513
</rh-tooltip>`}${!this.#hasMenu ? '' : html`

0 commit comments

Comments
 (0)