Skip to content

Commit 4ededa3

Browse files
committed
icons
1 parent 5fcf1d3 commit 4ededa3

File tree

6 files changed

+27
-13
lines changed

6 files changed

+27
-13
lines changed

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"@testing-library/react": "^11.2.5",
88
"@testing-library/user-event": "^12.8.3",
99
"bootstrap": "^4.6.0",
10+
"bootstrap-icons": "^1.4.1",
1011
"jquery": "^3.6.0",
1112
"react": "^17.0.2",
1213
"react-dom": "^17.0.2",

src/App.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,15 @@ function App() {
199199
<img src={logo} className="App-logo" alt="logo" />
200200
<h1 className="h2 m-0">{testText}</h1>
201201
</div>
202-
<div className="text-center d-flex p-1 align-items-center ml-auto">
203-
<button className="btn btn-light " onClick={() => setOpenLogin(true)}>
204-
{logged ? `Login: ${userName}` : "LOG IN"}
202+
<div className="text-center d-flex p-0 align-items-center flex-wrap ml-auto">
203+
{logged &&
204+
<button className="btn btn-light m-1" onClick={loadDataFromServer}>
205+
<i className="bi bi-arrow-clockwise px-1"></i>
206+
<span className='d-lg-inline d-none'>Update data</span>
207+
</button>
208+
}
209+
<button className="btn btn-light m-1" onClick={() => setOpenLogin(true)}>
210+
{logged ? `Login: ${userName}` : <span><i className="bi bi-arrow-right-circle"></i> LOG IN</span>}
205211
</button>
206212
</div>
207213
</nav>

src/Cards/AddCard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ function AddCard({ onCreate, onDeleteAll }) {
4949
</div>
5050

5151
<div className="col-lg-2 col-md-3 col-sm-4 col-6 p-1">
52-
<button className="btn btn-success btn-block" onClick={submitHandler}>Add card</button>
52+
<button className="btn btn-success btn-block" onClick={submitHandler}><i className="bi bi-clipboard-plus"></i> Add card</button>
5353
</div>
5454

5555
<div className="col-lg-2 col-md-3 col-sm-4 col-6 p-1">
56-
<button className="btn btn-danger btn-block" onClick={onDeleteAll}>Delete All</button>
56+
<button className="btn btn-danger btn-block" onClick={onDeleteAll}><i className="bi bi-x-square"></i> Delete All</button>
5757
</div>
5858

5959
</div>

src/Modal/ModalLogin.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@ function ModalLogin(props) {
8888

8989
<div className='bg-light form-group mb-2'>
9090
<div className='mb-1'>
91-
{userName ? `Login: "${userName}" ` : ``}
91+
92+
{userName ? <span>Login: {userName} </span> : ``}
9293
<span className={logged ? `badge badge-success` : `badge badge-danger`}>
93-
{logged ? 'AUTORISED' : 'UNAUTORISED'}
94+
{logged ? <span><i className="bi bi-key"> </i>AUTORISED</span> : 'UNAUTORISED'}
9495
</span>
9596
</div>
9697
</div>
@@ -109,14 +110,14 @@ function ModalLogin(props) {
109110
</div>
110111

111112
<div className='bg-light form-group form-row'>
112-
<div className="col">
113-
<button className="btn btn-primary col" onClick={tryLogin}>Log in</button>
113+
<div className="col-12 col-sm-4 col-md-5 p-1">
114+
<button className="btn btn-primary col" onClick={tryLogin}><i className="bi bi-person-check"></i> Log in</button>
114115
</div>
115-
<div className="col">
116-
<button className="btn btn-danger col" onClick={tryLogout}>Logout</button>
116+
<div className="col col-sm-4 col-md-4 p-1">
117+
<button className="btn btn-danger col" onClick={tryLogout}><i className="bi bi-person-x"></i> Logout</button>
117118
</div>
118-
<div className="col">
119-
<button className="btn btn-secondary col" onClick={tryClose}>Close</button>
119+
<div className="col-5 col-sm-4 col-md-3 p-1">
120+
<button className="btn btn-secondary col" onClick={tryClose}><i className="bi bi-x"></i> Close</button>
120121
</div>
121122
</div>
122123

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import App from './App';
55
import reportWebVitals from './reportWebVitals';
66

77
import 'bootstrap/dist/css/bootstrap.min.css';
8+
import 'bootstrap-icons/font/bootstrap-icons.css';
89

910
ReactDOM.render(
1011
<React.StrictMode>

0 commit comments

Comments
 (0)