Skip to content

Commit 5e986ae

Browse files
authored
Merge pull request #2 from maxchistt/sizefix
Sizefix
2 parents 563af62 + 185ae69 commit 5e986ae

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ function App() {
209209
{logged &&
210210
<button className="btn btn-light m-1" onClick={loadDataFromServer}>
211211
<i className="bi bi-arrow-clockwise px-1"></i>
212-
<span className='d-xl-inline d-none'>Update data</span>
212+
<span className='d-xl-inline d-none'>Update</span>
213213
</button>
214214
}
215215
<button className="btn btn-light m-1" onClick={() => setOpenLogin(true)}>

src/Cards/AddCard.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,33 @@ function AddCard({ onCreate, onDeleteAll }) {
4242
}
4343
}
4444

45+
function onEnter(e) {
46+
e.preventDefault()
47+
submitHandler()
48+
}
49+
4550
return (
4651
<div className="container">
4752
<div className="row my-2 text-center">
4853

49-
<div className="col-lg-9 col-md-10 col-12 p-1">
54+
<div className="col-xl-10 col-lg-10 col-md-10 col-12 p-1">
5055
<TextareaAutosize type="text" className="form-control" placeholder="Card name" id="Text"
5156
{...input.bind}
5257
style={{ resize: "none" }}
5358
minRows={1}
5459
maxRows={3}
5560
maxLength="100"
61+
onKeyPress={e => e.key === 'Enter' && onEnter(e)}
5662
/>
5763
</div>
5864

59-
<div className="col-lg-1 col-md-1 col-sm-3 col-4 p-1">
65+
<div className="col-xl-1 col-lg-1 col-md-1 col-sm-3 col-4 p-1">
6066
<Palette setColor={setColor} className={`btn btn-outline-secondary palitra-btn ${blackOnHover() ? "palitra-blackOnHover" : "palitra-lightOnHover"}`} style={{ width: "100%", background: color }}></Palette>
6167
</div>
6268

63-
<div className="col-lg-2 col-md-1 col p-1">
69+
<div className="col-xl-1 col-lg-1 col-md-1 col p-1">
6470
<button disabled={!input.value().trim()} className="btn btn-success btn-block" onClick={submitHandler}>
6571
<i className="bi bi-clipboard-plus"></i>
66-
<span className='d-lg-inline d-none'> Add card</span>
6772
</button>
6873
</div>
6974

src/Cards/CardList.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ function calcWidth() {
1212
const xlarge = 1200
1313
const winWidth = window.innerWidth
1414

15-
if (winWidth >= xlarge) return '20%'
16-
else if (winWidth >= large) return '25%'
17-
else if (winWidth >= middle) return '33.33%'
18-
else if (winWidth >= small) return '50%'
15+
if (winWidth >= xlarge) return '25%'
16+
else if (winWidth >= large) return '33.33%'
17+
else if (winWidth >= middle) return '50%'
18+
else if (winWidth >= small) return '100%'
1919
else return '100%'
2020
}
2121

0 commit comments

Comments
 (0)