Skip to content

Commit

Permalink
Merge pull request #768 from jurassic-period/master
Browse files Browse the repository at this point in the history
new setting button for CBPlayer
  • Loading branch information
ReDBrother committed Jul 30, 2020
2 parents 3c4646f + dd0bd53 commit 288453b
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ControlPanel = ({
const [mode, setMode] = useState(modes.pause);
const [speedMode, setSpeedMode] = useState(speedModes.normal);

const speedControlClassNames = cn('btn btn-sm border rounded ml-4', {
const speedControlClassNames = cn('btn btn-sm rounded ml-2 border', {
'btn-light': speedMode === speedModes.normal,
'btn-secondary': speedMode === speedModes.fast,
});
Expand Down Expand Up @@ -71,7 +71,21 @@ const ControlPanel = ({
)}
</button>
{children}
<button type="button" className={speedControlClassNames} onClick={onChangeSpeed}>x2</button>
<div className="dropup">
<button
className="btn btn-light px-2 ml-1 shadow-none d-flex"
type="button"
id="dropdownMenuButton"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<i className="fas fa-cog" />
</button>
<div className="dropdown-menu" aria-labelledby="dropdownMenuButton">
<button type="button" className={speedControlClassNames} onClick={onChangeSpeed}>x2</button>
</div>
</div>
</>
);
};
Expand Down

0 comments on commit 288453b

Please sign in to comment.