Skip to content

Commit 48d672f

Browse files
committed
init
1 parent dc9b185 commit 48d672f

11 files changed

+118
-102
lines changed

package-lock.json

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"react": "^18.1.0",
1010
"react-dom": "^18.1.0",
1111
"react-scripts": "5.0.1",
12+
"sass": "^1.52.3",
1213
"web-vitals": "^2.1.4"
1314
},
1415
"scripts": {

src/App.css

-38
This file was deleted.

src/App.js

+7-16
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
1-
import logo from './logo.svg';
2-
import './App.css';
1+
import './index.scss';
32

43
function App() {
54
return (
65
<div className="App">
7-
<header className="App-header">
8-
<img src={logo} className="App-logo" alt="logo" />
9-
<p>
10-
Edit <code>src/App.js</code> and save to reload.
11-
</p>
12-
<a
13-
className="App-link"
14-
href="https://reactjs.org"
15-
target="_blank"
16-
rel="noopener noreferrer"
17-
>
18-
Learn React
19-
</a>
20-
</header>
6+
<div>
7+
<h2>Счетчик:</h2>
8+
<h1>0</h1>
9+
<button className="minus">- Минус</button>
10+
<button className="plus">Плюс +</button>
11+
</div>
2112
</div>
2213
);
2314
}

src/App.test.js

-8
This file was deleted.

src/index.css

-13
This file was deleted.

src/index.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom/client';
3-
import './index.css';
43
import App from './App';
5-
import reportWebVitals from './reportWebVitals';
64

75
const root = ReactDOM.createRoot(document.getElementById('root'));
6+
87
root.render(
98
<React.StrictMode>
109
<App />
11-
</React.StrictMode>
10+
</React.StrictMode>,
1211
);
13-
14-
// If you want to start measuring performance in your app, pass a function
15-
// to log results (for example: reportWebVitals(console.log))
16-
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17-
reportWebVitals();

src/index.scss

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
body {
2+
margin: 0;
3+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
4+
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
5+
-webkit-font-smoothing: antialiased;
6+
-moz-osx-font-smoothing: grayscale;
7+
background-color: #edf6f9;
8+
}
9+
10+
.App {
11+
display: flex;
12+
align-items: center;
13+
justify-content: center;
14+
height: 100vh;
15+
text-align: center;
16+
17+
h1 {
18+
color: #000;
19+
font-size: 7rem;
20+
margin: 0;
21+
margin-bottom: 20px;
22+
23+
&.plus {
24+
color: #2a9d8f;
25+
}
26+
&.minus {
27+
color: #e63946;
28+
}
29+
}
30+
31+
h2 {
32+
font-size: 2rem;
33+
margin: 0;
34+
color: #556581;
35+
}
36+
37+
button {
38+
background: transparent;
39+
border: 2px solid transparent;
40+
text-align: center;
41+
font-size: 22px;
42+
border-radius: 15px;
43+
padding: 10px 25px;
44+
cursor: pointer;
45+
margin: 0 10px;
46+
transition: all 0.05s ease-in-out;
47+
48+
&.minus {
49+
background-color: #e63946;
50+
color: #fff;
51+
box-shadow: 0 4px 0 darken(#e63946, 10%);
52+
border: 1px solid darken(#e63946, 15%);
53+
}
54+
55+
&.plus {
56+
background-color: #2a9d8f;
57+
color: #fff;
58+
box-shadow: 0 4px 0 darken(#2a9d8f, 10%);
59+
border: 1px solid darken(#2a9d8f, 15%);
60+
}
61+
62+
&:hover {
63+
transform: translateY(-2px);
64+
}
65+
66+
&:active {
67+
transform: translateY(2px);
68+
box-shadow: none;
69+
}
70+
}
71+
}

src/logo.svg

-1
This file was deleted.

src/reportWebVitals.js

-13
This file was deleted.

src/setupTests.js

-5
This file was deleted.

0 commit comments

Comments
 (0)