diff --git a/src/components/BoardSwitcher.js b/src/components/BoardSwitcher.js index e99793a..f984601 100644 --- a/src/components/BoardSwitcher.js +++ b/src/components/BoardSwitcher.js @@ -1,27 +1,54 @@ -import React from "react"; +/* I apologize. This is my first time working with forks with github. I thought +I was supossed to create a react project simillar to the demonstrated version. +I did not understand I was supossed to build on the previous github repo, but now I +know and I wont make the mistake again. */ -function Board(props) { - let className = "board"; - if (props.selected) { - className += " selected"; - } +import React, { useState, version } from 'react'; + +function Square({ number, isActive }) { + const squareStyle = { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + width: '60px', + height: '80px', + margin: '20px', + fontSize: '30px', + border: isActive ? '7px solid blue' : '7px solid grey' + }; + + return ( +
{number}
+ ) +} - return
{props.index + 1}
; +function Button({ onClick }) { + return ( + + ) } -function BoardSwitcher(props) { - let boards = []; - for (let ii = 0; ii < props.numBoards; ii++) { - let isSelected = ii === 0; - boards.push(); +export default function App() { + const [activeSquareIndex, setActiveSquareIndex] = useState(0); + + const toggle = () => { + setActiveSquareIndex((activeSquareIndex + 1) % 5) } + const display = { + display: 'flex', + flexDirection: 'row' + } return (
-
{boards}
- +
+ + + + + +
+
- ); -} - -export default BoardSwitcher; + ) +}; \ No newline at end of file