-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dmitry
committed
Aug 13, 2024
1 parent
59a8e7f
commit b3b3dc8
Showing
6 changed files
with
72 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const btnPlayIcon = ` | ||
<svg | ||
class="cassette__button-play-icon" | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="30" | ||
height="30" | ||
fill="none" | ||
> | ||
<path fill="#E2E8F0" d="M8 6h3v18H8zm11 0h3v18h-3z" /> | ||
</svg> | ||
`; | ||
|
||
const btnPauseIcon = ` | ||
<svg | ||
class="cassette__button-pause-icon" | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="30" | ||
height="30" | ||
fill="none" | ||
> | ||
<path fill="#E2E8F0" d="M9.125 6.25v17.5L22.875 15 9.125 6.25Z" /> | ||
</svg> | ||
`; | ||
|
||
const btnPlayInner = document.querySelector(".cassette__button-play-inner"); | ||
|
||
export const initPlayBtn = () => { | ||
btnPlayInner.insertAdjacentHTML("beforeend", btnPauseIcon); | ||
}; | ||
|
||
export const changeOnPlayBtn = () => { | ||
const existIcon = document.querySelector(".cassette__button-pause-icon"); | ||
btnPlayInner.removeChild(existIcon); | ||
btnPlayInner.insertAdjacentHTML("beforeend", btnPlayIcon); | ||
}; | ||
|
||
export const changeOnPauseBtn = () => { | ||
const existIcon = document.querySelector(".cassette__button-play-icon"); | ||
btnPlayInner.removeChild(existIcon); | ||
btnPlayInner.insertAdjacentHTML("beforeend", btnPauseIcon); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters