Skip to content

Commit

Permalink
changed line breaks (bad practice) into css
Browse files Browse the repository at this point in the history
maybe move inline css to App.css?
  • Loading branch information
austinatose committed Jan 28, 2023
1 parent d6b2e92 commit 865fbdf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"scripts": {
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts --openssl-legacy provider build",
"build": "react-scripts --openssl-legacy-provider build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down
1 change: 1 addition & 0 deletions src/components/racetext.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const RaceText = () => {
return (
<>
<h1 className="text"
style={{padding: '10px'}}
onKeyDown = {e => {
e.preventDefault();
const key = e.key;
Expand Down
16 changes: 7 additions & 9 deletions src/pages/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,20 @@ const Settings = () => {
<div>
<h1>Settings</h1>
</div>
<button style={{width: "150px"}} className='start-button' onClick={() => setSentence(randomWords({ min: 3, max: 10, exactly: 15, join: ' '}))}>15 Words</button>
<br/>
<button style={{width: "150px"}} className='start-button' onClick={() => setSentence(randomWords({ min: 3, max: 10, exactly: 30, join: ' '}))}>30 Words</button>
<br/>
<button style={{width: "150px"}} className='start-button' onClick={() => setSentence(randomWords({ min: 3, max: 10, exactly: 50, join: ' '}))}>50 Words</button>
<br/>
<button style={{width: "150px", margin: "10px"}} className='start-button' onClick={() => setSentence(randomWords({ min: 3, max: 10, exactly: 15, join: ' '}))}>15 Words</button>
<button style={{width: "150px", margin: "10px"}} className='start-button' onClick={() => setSentence(randomWords({ min: 3, max: 10, exactly: 30, join: ' '}))}>30 Words</button>
<button style={{width: "150px", margin: "10px"}} className='start-button' onClick={() => setSentence(randomWords({ min: 3, max: 10, exactly: 50, join: ' '}))}>50 Words</button>
<form>
<label>
Custom text: <br/>
Custom text:
<input className='custom-input' type="text" value={tempsentence} onChange={(e) => settempsentence(e.target.value)} />
</label>
</form>
<br/>
<button style={{width: "190px"}} className='start-button' onClick={() => setSentence(tempsentence)}>Submit Custom Text</button>
<button style={{width: "190px", margin: "30px"}} className='start-button' onClick={() => setSentence(tempsentence)}>Submit Custom Text</button>
</>
);
}

export default Settings;

//TODO: move inline css to App.css

0 comments on commit 865fbdf

Please sign in to comment.