fix(#219): fixed play button style

pull/24/head
Farber Denis 3 years ago committed by Andrei Dekterev
parent 5e771c21f9
commit 0fcd19a828
  1. 1
      src/features/StreamPlayer/index.tsx
  2. 18
      src/features/StreamPlayer/styled.tsx

@ -143,6 +143,7 @@ export const StreamPlayer = (props: Props) => {
: <Backward size='lg' onClick={rewindBackward}>{REWIND_SECONDS}</Backward>} : <Backward size='lg' onClick={rewindBackward}>{REWIND_SECONDS}</Backward>}
<PlayStop <PlayStop
size='lg' size='lg'
fullWidth
marginRight={0} marginRight={0}
playing={playing} playing={playing}
onClickCapture={() => { onClickCapture={() => {

@ -149,6 +149,7 @@ const sizes = {
} }
type PlayStopProps = { type PlayStopProps = {
fullWidth?: boolean,
marginRight?: number, marginRight?: number,
playing: boolean, playing: boolean,
size?: keyof typeof sizes, size?: keyof typeof sizes,
@ -163,10 +164,18 @@ export const PlayStop = styled(ButtonBase)<PlayStopProps>`
)}; )};
${({ size = 'sm' }) => ( ${({ size = 'sm' }) => (
css` css`
width: 100%; width: ${sizes[size]}px;
height: ${sizes[size]}px; height: ${sizes[size]}px;
` `
)}; )};
${({ fullWidth }) => (
fullWidth
? css`
width: 100%;
`
: '')};
${isMobileDevice ${isMobileDevice
? css` ? css`
width: ${sizes.sm}px; width: ${sizes.sm}px;
@ -257,10 +266,13 @@ type PlaybackTimeProps = {
} }
export const PlaybackTime = styled.span<PlaybackTimeProps>` export const PlaybackTime = styled.span<PlaybackTimeProps>`
width: ${({ width = 130 }) => `${width}px`}; width: ${({ width = 150 }) => `${width}px`};
font-weight: 600; font-weight: 600;
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
white-space: nowrap;
margin-right: 10px;
${isMobileDevice ${isMobileDevice
? css` ? css`
margin-left: 5px; margin-left: 5px;
@ -325,6 +337,8 @@ export const ChaptersText = styled.span`
font-size: 16px; font-size: 16px;
color: #fff; color: #fff;
text-align: center; text-align: center;
white-space: nowrap;
${isMobileDevice ${isMobileDevice
? css` ? css`
margin: 0 5px; margin: 0 5px;

Loading…
Cancel
Save