Skip to content

Commit 8254e74

Browse files
committed
Fix styling issue
1 parent 18b68a0 commit 8254e74

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "replay-viewer",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "Rocket League replay viewer React component and tooling",
55
"main": "./lib/index.js",
66
"types": "./lib/index.d.ts",

src/viewer/components/ReplayViewer.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import FullscreenIcon from "@material-ui/icons/Fullscreen"
44
import FullscreenExitIcon from "@material-ui/icons/FullscreenExit"
55
import { styled } from "@material-ui/styles"
66
import React, { createRef, PureComponent, RefObject } from "react"
7-
import Fullscreen from "react-full-screen"
7+
import FullScreen from "react-full-screen"
88

99
import { GameManager } from "../../managers/GameManager"
1010
import Scoreboard from "./ScoreBoard"
@@ -66,7 +66,10 @@ class ReplayViewer extends PureComponent<Props, State> {
6666
const onClick = () => this.toggleFullscreen(!this.state.fullScreen)
6767
return (
6868
<ViewerContainer>
69-
<Fullscreen enabled={fullScreen} onChange={this.toggleFullscreen}>
69+
<FullscreenWrapper
70+
enabled={fullScreen}
71+
onChange={this.toggleFullscreen}
72+
>
7073
<Viewer>
7174
<div ref={this.mount} />
7275
</Viewer>
@@ -78,7 +81,7 @@ class ReplayViewer extends PureComponent<Props, State> {
7881
</Typography>
7982
</Button>
8083
</FullscreenToggle>
81-
</Fullscreen>
84+
</FullscreenWrapper>
8285
</ViewerContainer>
8386
)
8487
}
@@ -99,6 +102,12 @@ const Viewer = styled("div")({
99102
},
100103
})
101104

105+
const FullscreenWrapper = styled(FullScreen)({
106+
width: "100%",
107+
108+
height: "100%",
109+
})
110+
102111
const FullscreenToggle = styled("div")({
103112
position: "absolute",
104113
bottom: 0,

0 commit comments

Comments
 (0)