Created
August 5, 2022 11:10
-
-
Save vamshi9666/50804c8bce774d6b8f56d5ec18990ff7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from "react"; | |
import logo from "./logo.svg"; | |
import "./App.css"; | |
function App() { | |
return ( | |
<div className="App"> | |
<div | |
style={{ | |
// width: "200px", | |
backgroundColor: "green", | |
paddingRight: 13, | |
// justifyContent: "space-evenly", | |
// flexDirection: "row-reverse", | |
display: "flex", | |
}} | |
> | |
{new Array(5).fill(0).map((_, index) => { | |
return ( | |
<div | |
key={index} | |
style={{ | |
width: 100, | |
height: 100, | |
borderRadius: 50, | |
backgroundColor: "red", | |
transform: `translateX(-${index * 50}px)`, | |
display: "flex", | |
alignItems: "center", | |
justifyContent: "center", | |
border: "1px solid black", | |
}} | |
> | |
{index} | |
</div> | |
); | |
})} | |
</div> | |
</div> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment