Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new setting button for CBPlayer #768

Merged
merged 7 commits into from
Jul 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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">
Copy link
Collaborator

Choose a reason for hiding this comment

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

что за класс такой интересный?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Это бутсраповский класс для "Выпадающий вверх".

Copy link
Collaborator

Choose a reason for hiding this comment

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

Верно, извиняюсь, тут пропустил

Copy link
Contributor Author

Choose a reason for hiding this comment

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

без него тоже вверх выпадает)) убрал его

<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