Skip to content

Commit

Permalink
Style a little bit player input. References #5
Browse files Browse the repository at this point in the history
  • Loading branch information
LoanR authored and emillumine committed Sep 22, 2020
1 parent 884e4a4 commit d54cbf6
Show file tree
Hide file tree
Showing 8 changed files with 492 additions and 34 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"giphy-api": "^2.0.1",
"node-sass": "^4.14.1",
"random-words": "^1.1.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
Expand Down
3 changes: 0 additions & 3 deletions src/App.css

This file was deleted.

2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import GiphyApi from "giphy-api";
import randomWords from "random-words";
import GifList from "./components/gif_list";
import PlayerInput from "./components/player_input";
import "./App.css";
import "./assets/stylesheets/App.scss";

const giphy = GiphyApi("fafiKafsEJZchqyTLli0XAt4PQkz3Sk9");

Expand Down
36 changes: 36 additions & 0 deletions src/assets/stylesheets/App.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.App {
text-align: center;
padding: 100px 0 0;

.interaction {
// border: 1px solid brown;
display: flex;
height: 100px;
justify-content: center;
align-items: center;

.input-field {
border: none;
height: 70px;
font-size: 25px;
border-radius: 5px 0 0 5px;
-webkit-appearance: none;
background: none;
outline: 0;
padding: 0;
text-align: left;
padding-left: 20px;
background-color: rgb(230, 230, 230);
color: rgb(66, 66, 66);
}
.input-submit {
height: 70px;
padding: 0 20px;
font-size: 25px;
border: none;
border-radius: 0 5px 5px 0;
color: rgb(230, 230, 230);
background-color: rgb(66, 66, 66);
}
}
}
File renamed without changes.
5 changes: 3 additions & 2 deletions src/components/player_input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ class PlayerInput extends React.Component {
render() {
const { playerAnswer } = this.state;
return (
<form onSubmit={this.handleSubmit}>
<form className="interaction" onSubmit={this.handleSubmit}>
<input
type="text"
className="input-field"
placeholder="Your guess"
value={playerAnswer}
onChange={this.handleChange}
/>
<input type="submit" value="Play" />
<input className="input-submit" type="submit" value="Play" />
</form>
);
}
Expand Down
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import React from "react";
import ReactDOM from "react-dom";
import "./assets/stylesheets/index.scss";
import App from "./App";
import * as serviceWorker from "./serviceWorker";

ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
document.getElementById("root")
);

// If you want your app to work offline and load faster, you can change
Expand Down
Loading

0 comments on commit d54cbf6

Please sign in to comment.