DocSpace-client/packages/asc-web-common/components/MediaViewer/sub-components/control-btn.js

35 lines
738 B
JavaScript
Raw Normal View History

2022-01-28 13:44:58 +00:00
import React from "react";
import styled from "styled-components";
import PropTypes from "prop-types";
import { Base } from "@appserver/components/themes";
const StyledVideoControlBtn = styled.div`
display: inline-block;
height: 30px;
line-height: 25px;
margin: 5px;
width: 40px;
border-radius: 2px;
cursor: pointer;
text-align: center;
&:hover {
2022-01-28 13:44:58 +00:00
background-color: ${(props) =>
props.theme.mediaViewer.controlBtn.backgroundColor};
}
`;
StyledVideoControlBtn.defaultProps = { theme: Base };
const ControlBtn = (props) => {
2022-01-28 13:44:58 +00:00
return (
<StyledVideoControlBtn {...props}>{props.children}</StyledVideoControlBtn>
);
};
2020-04-30 07:35:02 +00:00
ControlBtn.propTypes = {
children: PropTypes.any,
};
export default ControlBtn;