|
1 | 1 | <script lang="ts">
|
2 |
| - import { cssVars } from '../actions/cssVars'; |
3 |
| -
|
4 | 2 | export let columns = 0;
|
5 | 3 | export let gap = 0;
|
6 | 4 | export let columnGap = gap;
|
|
38 | 36 | templateColumns ??
|
39 | 37 | template ??
|
40 | 38 | (autoColumns ? `repeat(auto-fill, minmax(${autoColumns}, 1fr))` : `repeat(${columns}, 1fr)`);
|
41 |
| -
|
42 |
| - $: styleVars = { |
43 |
| - templateColumns: templateColumnsResolved, |
44 |
| - templateRows, |
45 |
| - gap, |
46 |
| - columnGap, |
47 |
| - rowGap, |
48 |
| - autoFlow, |
49 |
| - items, // TODO: Map start: flex-start?, end: flex-end? |
50 |
| - justify, // TODO: Map start: flex-start?, end: flex-end?, between: space-between, around: space-around, evenly: space-evenly |
51 |
| - justifyItems, // TODO: Map start: flex-start?, end: flex-end?, between: space-between, around: space-around, evenly: space-evenly |
52 |
| - content, // TODO: Map start: flex-start?, end: flex-end?, between: space-between, around: space-around, evenly: space-evenly |
53 |
| - // place, // TODO: Map start: flex-start?, end: flex-end?, between: space-between, around: space-around, evenly: space-evenly |
54 |
| - }; |
55 | 39 | </script>
|
56 | 40 |
|
57 | 41 | <div
|
58 |
| - use:cssVars={styleVars} |
59 | 42 | class="Grid"
|
60 | 43 | class:grid={!inline}
|
61 | 44 | class:inline-grid={inline}
|
62 | 45 | class:stack
|
| 46 | + style:--templateColumns={templateColumnsResolved} |
| 47 | + style:--templateRows={templateRows} |
| 48 | + style:--gap={gap} |
| 49 | + style:--columnGap={columnGap} |
| 50 | + style:--rowGap={rowGap} |
| 51 | + style:--autoFlow={autoFlow} |
| 52 | + style:--items={items} |
| 53 | + style:--justify={justify} |
| 54 | + style:--justifyItems={justifyItems} |
| 55 | + style:--content={content} |
63 | 56 | on:click
|
64 | 57 | {...$$restProps}
|
65 | 58 | >
|
|
0 commit comments