diff --git a/package-lock.json b/package-lock.json index 1ff1c3f..b53c999 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,9 +15,10 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", + "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-scripts": "5.0.1", + "react-scripts": "^5.0.1", "web-vitals": "^2.1.4" }, "devDependencies": { diff --git a/package.json b/package.json index 565bc42..c879e8e 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,10 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", + "prop-types": "^15.8.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-scripts": "5.0.1", + "react-scripts": "^5.0.1", "web-vitals": "^2.1.4" }, "scripts": { diff --git a/src/App.css b/src/App.css index 74b5e05..56aa455 100644 --- a/src/App.css +++ b/src/App.css @@ -1,38 +1,38 @@ .App { - text-align: center; + text-align: center; } .App-logo { - height: 40vmin; - pointer-events: none; + height: 40vmin; + pointer-events: none; } @media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } + .App-logo { + animation: App-logo-spin infinite 20s linear; + } } .App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; + background-color: #282c34; + min-height: 100vh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: calc(10px + 2vmin); + color: rgb(255, 255, 255); } .App-link { - color: #61dafb; + color: #61dafb; } @keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } } diff --git a/src/App.js b/src/App.js index 6d37a6b..5bfacdb 100644 --- a/src/App.js +++ b/src/App.js @@ -1,13 +1,12 @@ import './css/style.css' -import Main from './Pages/Main'; +import Main from './Pages/Main' function App() { - return ( -
-
-
- - ); + return ( +
+
+
+ ) } -export default App; +export default App diff --git a/src/Components/GridComp/GridComp.jsx b/src/Components/GridComp/GridComp.jsx index 8c03daa..95a9ab3 100644 --- a/src/Components/GridComp/GridComp.jsx +++ b/src/Components/GridComp/GridComp.jsx @@ -5,55 +5,71 @@ import Typography from '@mui/material/Typography' import styles from './GridComp.module.css' const Rand = (min, max) => Math.floor(Math.random() * (max - min + 1) + min) -export default function GridComp() { +export default function GridComp({ name }) { return ( - - {Array.from(Array(1000)).map(() => ( - - - - -
-
-
- - + - {/* */} - - + {/* */} + + - - - asdasdsasddasdasdasdasdasdasdas - - - asfasfaasfasfa - - - {Array.from(Array(Rand(1, 5))).map(() => ( - - dsadas - - ))} - - - - - ))} - + + + asdasdsasddasdasdasdasdasdasdas + + + asfasfaasfasfa + + + {Array.from(Array(Rand(1, 5))).map(() => ( + + dsadas + + ))} + + + + + ))} + +
) } diff --git a/src/Components/HeaderComp/HeaderComp.jsx b/src/Components/HeaderComp/HeaderComp.jsx index 6562645..7dba983 100644 --- a/src/Components/HeaderComp/HeaderComp.jsx +++ b/src/Components/HeaderComp/HeaderComp.jsx @@ -1,8 +1,22 @@ import React from 'react' -import { AppBar, Toolbar, Typography, Button, IconButton } from '@mui/material' +import { + AppBar, + Toolbar, + Typography, + Button, + IconButton, + Autocomplete, + TextField, + Stack, +} from '@mui/material' import MenuIcon from '@mui/icons-material/Menu' +import { useState } from 'react' + +const top100Films = [] export default function HeaderComp() { + const [value, setValue] = useState('') + console.log(value) return (
@@ -23,6 +37,31 @@ export default function HeaderComp() { > News + + option.title)} + onInputChange={(event, newImputValue) => { + setValue(newImputValue) + }} + renderInput={(params) => ( + // eslint-disable-next-line react/jsx-props-no-spreading + + )} + /> + diff --git a/src/Pages/Main.jsx b/src/Pages/Main.jsx index 20bcb5f..7df0eaa 100644 --- a/src/Pages/Main.jsx +++ b/src/Pages/Main.jsx @@ -6,9 +6,14 @@ import HeaderComp from '../Components/HeaderComp/HeaderComp' export default function Main() { return (
+ + - - + +
+ +
+ {/* */}
diff --git a/src/index.css b/src/index.css index ec2585e..6e9d4af 100644 --- a/src/index.css +++ b/src/index.css @@ -1,13 +1,14 @@ body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + margin: 0; + background-color: #f2f2f2; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', + 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', + 'Helvetica Neue', sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', - monospace; + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + monospace; }