mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-09-13 04:02:59 +02:00
27 lines
511 B
Svelte
27 lines
511 B
Svelte
<!--
|
|
@component Organized display of plots as bootstrap (sveltestrap) grid
|
|
|
|
Properties:
|
|
- `itemsPerRow Number`: Elements to render per row
|
|
- `items [Any]`: List of plot components to render
|
|
-->
|
|
|
|
<script>
|
|
import {
|
|
Row,
|
|
Col,
|
|
} from "@sveltestrap/sveltestrap";
|
|
|
|
export let itemsPerRow
|
|
export let items
|
|
</script>
|
|
|
|
<Row cols={{ xs: 1, sm: 2, md: 3, lg: itemsPerRow}}>
|
|
{#each items as item}
|
|
<Col class="px-1">
|
|
<slot {item}/>
|
|
</Col>
|
|
{/each}
|
|
</Row>
|
|
|