diff --git a/src/App.css b/src/App.css new file mode 100644 index 0000000..12da395 --- /dev/null +++ b/src/App.css @@ -0,0 +1,22 @@ +body { + display: flex; + justify-content: center; + height: 100vh; + margin: 0; +} + +.square-container { + display: flex; + justify-content: center; + gap: 10px; + margin-bottom: 20px; +} + +.square { + width: 50px; + height: 50px; + color: white; + display: flex; + align-items: center; + justify-content: center; +} diff --git a/src/App.jsx b/src/App.jsx new file mode 100644 index 0000000..2f0ca20 --- /dev/null +++ b/src/App.jsx @@ -0,0 +1,12 @@ +import React from 'react'; +import SquareSet from './SquareSet'; + +function App() { + return ( +
+ +
+ ); +} + +export default App; diff --git a/src/SquareSet.jsx b/src/SquareSet.jsx new file mode 100644 index 0000000..eba3599 --- /dev/null +++ b/src/SquareSet.jsx @@ -0,0 +1,33 @@ +import React, { useState } from 'react'; +import './App.css'; + +const SquareSet = () => { + const [activeIndex, setActiveIndex] = useState(0); + + const squares = Array.from({ length: 5 }); // Create an array for 5 squares + + const handleToggle = () => { + setActiveIndex((prevIndex) => (prevIndex + 1) % squares.length); + }; + + return ( +
+
+ {squares.map((_, index) => ( +
+ Square {index + 1} +
+ ))} +
+ +
+ ); +}; + +export default SquareSet; diff --git a/src/index.css b/src/index.css index 4efa42a..6119ad9 100644 --- a/src/index.css +++ b/src/index.css @@ -1,25 +1,68 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + body { margin: 0; - padding: 0; - font-family: sans-serif; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; } -.boards { - margin: 20px 0; - overflow: hidden; +h1 { + font-size: 3.2em; + line-height: 1.1; } -.board { - border: 5px solid #ccc; - float: left; - font: - 700 24px HelveticaNeue, - Helvetica, - Arial; - margin-right: 20px; - padding: 20px; +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; } -.board.selected { - border-color: #3ba8aa; +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } } diff --git a/src/main.jsx b/src/main.jsx index 782f402..89f91e5 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -1,11 +1,10 @@ -import React from "react"; -import ReactDOM from "react-dom/client"; -import BoardSwitcher from "./components/BoardSwitcher"; -import "./index.css"; +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import App from './App.jsx' +import './index.css' -const root = ReactDOM.createRoot(document.getElementById("root")); -root.render( - - - -); +createRoot(document.getElementById('root')).render( + + + , +)