Skip to content
Snippets Groups Projects
Commit 3ad72c72 authored by Viarezo's avatar Viarezo
Browse files

yes

parent c43347fa
No related branches found
No related tags found
No related merge requests found
import './App.css'; import './App.css';
import { Counter } from './Counter'; import { Counter } from './Counter';
import { default as Grid } from './Grid.js';
const App = () => { const App = () => {
const compteurs = []
for (let pas = 0; pas < 5; pas++) {
compteurs.push(<Counter title={"Le compteur n° "+String(pas)}/>)
}
return ( return (
<div> <div>
<div className="App"> <div className="App">
...@@ -14,9 +9,7 @@ const App = () => { ...@@ -14,9 +9,7 @@ const App = () => {
<h1>Bienvenue sur notre super site !</h1> <h1>Bienvenue sur notre super site !</h1>
</div> </div>
</div> </div>
<Grid> <Counter />
{compteurs}
</Grid>
</div> </div>
); );
} }
......
import './grid.css';
const Grid = (props) => (
<div class="grid">
{props.children}
</div>
)
export default Grid
\ No newline at end of file
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment