From c2eda5c0f25850d1c64ed238458e2bd696d06cc3 Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Sat, 9 Jun 2018 18:13:47 +0200 Subject: Fix home screen style --- frontend/src/components/home/ChooseNameForm.jsx | 42 +++++++++++++++++++++ frontend/src/components/home/Home.css | 13 +++++++ frontend/src/components/home/Home.jsx | 13 +++++++ .../src/components/home/background-zeus-temple.jpg | Bin 0 -> 571089 bytes frontend/src/components/home/logo-7-wonders.png | Bin 0 -> 301442 bytes 5 files changed, 68 insertions(+) create mode 100644 frontend/src/components/home/ChooseNameForm.jsx create mode 100644 frontend/src/components/home/Home.css create mode 100644 frontend/src/components/home/Home.jsx create mode 100644 frontend/src/components/home/background-zeus-temple.jpg create mode 100644 frontend/src/components/home/logo-7-wonders.png (limited to 'frontend/src/components/home') diff --git a/frontend/src/components/home/ChooseNameForm.jsx b/frontend/src/components/home/ChooseNameForm.jsx new file mode 100644 index 00000000..119fc851 --- /dev/null +++ b/frontend/src/components/home/ChooseNameForm.jsx @@ -0,0 +1,42 @@ +// @flow +import { Button, Classes, InputGroup, Intent } from '@blueprintjs/core'; +import React, { Component } from 'react'; +import { connect } from 'react-redux'; +import { actions } from '../../redux/players'; + +export type ChooseNameFormPresenterProps = { + chooseUsername: (username: string) => void, +} + +class ChooseNameFormPresenter extends Component { + _username = ''; + + play = e => { + e.preventDefault(); + if (this._username !== undefined) { + this.props.chooseUsername(this._username); + } + }; + + render() { + return ( +
+ (this._username = e.target.value)} + rightElement={this.renderSubmit()} + /> + + ); + } + + renderSubmit = () => ( +