1
0
Fork 0
mirror of https://github.com/TheTaz25/denis.ergin.git synced 2025-07-08 17:58:48 +00:00
denis.ergin/src/components/slides/css-selectors-advanced/nth-box.astro

33 lines
464 B
Text

---
interface Props {
amount: number
}
const { amount } = Astro.props;
---
<div class="flex">
{ new Array(amount).fill(0).map((_, index) => (
<div class="child">
{ index + 1 }
</div>
)) }
</div>
<style>
.flex {
display: flex;
justify-content: center;
gap: 1rem;
}
.child {
background: lightgray;
min-height: 150px;
min-width: 150px;
display: flex;
justify-content: center;
align-items: center;
}
</style>