lab 4 myButton
This commit is contained in:
parent
618acc3710
commit
ded5bc5b0d
3933
package-lock.json
generated
Normal file
3933
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "pibd-21-bakalskaya-e-d-internet-programming-",
|
"name": "lec4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@ -11,16 +11,22 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0",
|
||||||
|
"react-router-dom": "^6.18.0",
|
||||||
|
"bootstrap": "^5.3.2",
|
||||||
|
"react-bootstrap": "^2.9.1",
|
||||||
|
"react-bootstrap-icons": "^1.10.3",
|
||||||
|
"prop-types": "^15.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/react": "^18.2.37",
|
"@types/react": "^18.2.15",
|
||||||
"@types/react-dom": "^18.2.15",
|
"@types/react-dom": "^18.2.7",
|
||||||
"@vitejs/plugin-react": "^4.2.0",
|
"@vitejs/plugin-react": "^4.0.3",
|
||||||
"eslint": "^8.53.0",
|
"eslint": "^8.45.0",
|
||||||
"eslint-plugin-react": "^7.33.2",
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
|
"eslint-plugin-react": "^7.32.2",
|
||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"eslint-plugin-react-refresh": "^0.4.4",
|
"eslint-plugin-react-refresh": "^0.4.3",
|
||||||
"vite": "^5.0.0"
|
"vite": "^4.4.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
45
src/App.jsx
45
src/App.jsx
@ -1,35 +1,16 @@
|
|||||||
import { useState } from 'react'
|
function MyButton() {
|
||||||
import reactLogo from './assets/react.svg'
|
|
||||||
import viteLogo from '/vite.svg'
|
|
||||||
import './App.css'
|
|
||||||
|
|
||||||
function App() {
|
|
||||||
const [count, setCount] = useState(0)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<button>
|
||||||
<div>
|
I'm a button
|
||||||
<a href="https://vitejs.dev" target="_blank">
|
</button>
|
||||||
<img src={viteLogo} className="logo" alt="Vite logo" />
|
);
|
||||||
</a>
|
|
||||||
<a href="https://react.dev" target="_blank">
|
|
||||||
<img src={reactLogo} className="logo react" alt="React logo" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<h1>Vite + React</h1>
|
|
||||||
<div className="card">
|
|
||||||
<button onClick={() => setCount((count) => count + 1)}>
|
|
||||||
count is {count}
|
|
||||||
</button>
|
|
||||||
<p>
|
|
||||||
Edit <code>src/App.jsx</code> and save to test HMR
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<p className="read-the-docs">
|
|
||||||
Click on the Vite and React logos to learn more
|
|
||||||
</p>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default App
|
export default function MyApp() {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h1>Welcome to my app</h1>
|
||||||
|
<MyButton />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
0
src/components/navigation.jsx
Normal file
0
src/components/navigation.jsx
Normal file
Loading…
x
Reference in New Issue
Block a user