Skip to content

Commit

Permalink
Merge pull request #58 from santimb96/feature/new-card-design
Browse files Browse the repository at this point in the history
close button added to media player
  • Loading branch information
santimb96 authored May 27, 2022
2 parents 1908894 + df6581d commit 299b0a3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spoticlone/src/components/MediaPlayer/MediaPlayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const MediaPlayer = ({
goToPrevious,
isFavourite,
onClickFavourite,
setSelectedSong
}) => {
const { user } = useContext(AuthContext);
console.log(user);
Expand Down Expand Up @@ -214,6 +215,9 @@ const MediaPlayer = ({
: "00:00"}
</p>
</div>
<div className="close-button-container">
<i onClick={() => setSelectedSong(null)} className="fa-solid fa-xmark"></i>
</div>
</div>
</div>
);
Expand Down
26 changes: 26 additions & 0 deletions spoticlone/src/components/MediaPlayer/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@
//position: sticky;
background-color: $mediaBack;
border-radius: 15px;
.close-button-container{
position: absolute;
top:2%;
left: 90%;
width: 5%;
height: 30%;
background: transparent;
display: flex;
justify-content: end;
align-items: flex-start;
i{
font-size: 12px;
padding: 5px;
color: white;
}
}
}
.control-buttons {
display: flex;
Expand Down Expand Up @@ -220,6 +236,16 @@
.player-container {
width: 100vw;
border-radius: 0;
.close-button-container{
left: 81%;
i{
font-size: 14px;
transition: all 0.3s ease;
&:hover{
color: $tablePresentationColor;
}
}
}
}
.fav-icon-container{
position: absolute;
Expand Down
1 change: 1 addition & 0 deletions spoticlone/src/pages/PublicWrapper/PublicWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ const PublicWrapper = () => {
goToPrevious={goToPrevious}
isFavourite={favouriteList?.find(fav => fav?.songId === selectedSong?._id)}
onClickFavourite={onClickFavourite}
setSelectedSong={setSelectedSong}
/>
) : (
<Footer />
Expand Down

1 comment on commit 299b0a3

@vercel
Copy link

@vercel vercel bot commented on 299b0a3 May 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

music-project-wozzo – ./

music-project-wozzo-git-master-santimb96.vercel.app
music-project-wozzo-santimb96.vercel.app

Please sign in to comment.