|
@@ -0,0 +1,36 @@
|
|
|
+import React from "react";
|
|
|
+import styled from "styled-components";
|
|
|
+import ClickToCopy from "../util/ClickToCopy";
|
|
|
+import Button from "../util/Button";
|
|
|
+
|
|
|
+const Container = styled.div`
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-flow: column nowrap;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+`
|
|
|
+
|
|
|
+const NameLabel = styled.span`
|
|
|
+ padding: 0.2em;
|
|
|
+`
|
|
|
+
|
|
|
+const CodeLabel = styled.span`
|
|
|
+ padding: 0.2em;
|
|
|
+ margin-bottom: 0.3em;
|
|
|
+`
|
|
|
+
|
|
|
+const StartButton = styled(Button)`
|
|
|
+ padding: 1em;
|
|
|
+ margin: 0.2em;
|
|
|
+`
|
|
|
+
|
|
|
+const PreRound = ({ gameId, playerName, onStart }) => (
|
|
|
+ <Container>
|
|
|
+ <NameLabel>Playing as {playerName}</NameLabel>
|
|
|
+ <CodeLabel>Game Code: <ClickToCopy text={gameId} /></CodeLabel>
|
|
|
+ <StartButton onClick={onStart}>Start Game</StartButton>
|
|
|
+ </Container>
|
|
|
+);
|
|
|
+
|
|
|
+export default PreRound;
|