Skip to content

Commit

Permalink
style(player): clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
rwieruch committed Sep 3, 2016
1 parent edf9d48 commit 4310136
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
12 changes: 11 additions & 1 deletion src/components/Player/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ class Player extends React.Component {
const { user, title, stream_url } = track;
const { username } = entities.users[user];

const isMuted = !volume;

const muteClass = classNames(
'fa',
{
'fa-volume-up': !isMuted,
'fa-volume-off': isMuted,
}
);

const playClass = classNames(
'fa',
{
Expand Down Expand Up @@ -101,7 +111,7 @@ class Player extends React.Component {
</div>
<div className="player-content-action">
<ButtonInline onClick={() => onSetToggle(toggleTypes.VOLUME)}>
<i className="fa fa-volume-up" /> {volume}
<i className={muteClass} />
</ButtonInline>
</div>
<div className="player-content-action">
Expand Down
3 changes: 1 addition & 2 deletions styles/components/player.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
&-action {
font-size: $bigIcon;
cursor: pointer;
text-align: center;

&:hover {
color: $mainColor;
Expand All @@ -48,7 +47,7 @@
}

div {
margin: auto $paddingVW;
margin: auto $padding;
}

}
Expand Down
1 change: 0 additions & 1 deletion styles/custom/variable.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
$padding: 20px;
$paddingVW: 2vw;

$fontColor: #A0A0A0;

Expand Down

0 comments on commit 4310136

Please sign in to comment.