Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gridHeader and layout #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 7 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"html-react-parser": "^0.9.1",
"json-format-highlight": "^1.0.1",
"react": "^16.8.6",
"react-contenteditable": "^3.3.1",
"react-dom": "^16.8.6",
"react-json-view": "^1.19.1",
"react-qr-svg": "^2.2.1",
Expand All @@ -36,4 +35,4 @@
"last 1 safari version"
]
}
}
}
Empty file.
14 changes: 14 additions & 0 deletions src/App/components/gridHeader/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react'
import './gridHeader.css'

class GridHeader extends React.Component {
render() {
return (
<div>
<p>{this.props.text}</p>
</div>
)
}
}

export default GridHeader
12 changes: 10 additions & 2 deletions src/App/components/header/header.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
.header {
display: flex;
flex-direction: row;
height: 100%;
width: 100%;
padding-left: 2%;
align-items: center;
background-color: #333
}

.header__logo,
.header__gear {
float: left;
}

.header__gear {
font-size: 25px;
color: whitesmoke
}
6 changes: 2 additions & 4 deletions src/App/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ class Header extends React.Component {
render() {
return (
<div className="header">
<Container fixed>
<div className="header__logo">QR Converter</div>
<div className="header__gear">A</div>
</Container>
<div className="header__gear">QR Converter</div>
<div className="header__logo"></div>
</div>
)
}
Expand Down
6 changes: 3 additions & 3 deletions src/App/components/qr/qr.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
justify-content: center;
}
.qr__element {
width: 100px;
height: 100px;
width: 200px;
height: 200px;
max-width: 100%;
max-height: 100%;
padding: 7px;
padding: 6px;
border-radius:4px;
background-color: #fff;
}
Expand Down
1 change: 0 additions & 1 deletion src/App/components/save/save.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.save {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
grid-area: save;
}
7 changes: 2 additions & 5 deletions src/App/components/search/search.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
.search {
margin-top: 5px;
padding: 5px 10px;
display: flex;
width: 100%;
max-width: 200px;
padding: 10px;
background-color: #333;
}

.search .input--checkbox {
Expand Down
8 changes: 1 addition & 7 deletions src/App/components/textInput/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'
import ContentEditable from 'react-contenteditable'
import './textInput.css'

class TextInput extends React.Component {
Expand All @@ -22,14 +21,9 @@ class TextInput extends React.Component {
render() {

return (
<ContentEditable
tabIndex={0}
<textarea
className="textInput"
innerRef={this.textInputRef}
html={this.props.value}
disabled={false}
onChange={this.handleChange}
tagName='code'
/>
)
}
Expand Down
4 changes: 4 additions & 0 deletions src/App/components/textInput/textInput.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
width: 100%;
height: 100%;
padding: 25px;
resize: none;
background-color: transparent;
border-color: transparent;
color: white;
}
5 changes: 5 additions & 0 deletions src/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Header from './components/header'
import Search from './components/search'
import './App.css'
import Store, { QRS } from 'App/store'
import GridHeader from './components/gridHeader'

class App extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -85,15 +86,19 @@ class App extends React.Component {
</aside>
<main className="app__main">
<div className="app__textInput">
<GridHeader text="Input data" />
<TextInput value={this.state.text} onChange={this.handleText} placeholder="Write something" />
</div>
<div className="app__textOutput">
<GridHeader text="Formatted data" />
<TextOutput value={this.state.text} placeholder="..." />
</div>
<div className="app__qr">
<GridHeader text="Result QR" />
<QR value={this.state.text}></QR>
</div>
<div className="app__save">
<GridHeader text="Options" />
<Save onSubmit={this.handleSubmit} />
</div>
</main>
Expand Down