2023-07-27 14:31:52 +09:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2021-12-30 21:47:48 +09:00
|
|
|
<template>
|
2023-01-15 08:07:11 +09:00
|
|
|
<div :class="$style.root">
|
2021-12-30 21:47:48 +09:00
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2023-01-15 08:07:11 +09:00
|
|
|
import { provide } from 'vue';
|
|
|
|
|
2021-12-30 21:47:48 +09:00
|
|
|
const props = withDefaults(defineProps<{
|
2022-06-29 16:07:38 +09:00
|
|
|
minWidth?: number;
|
2021-12-30 21:47:48 +09:00
|
|
|
}>(), {
|
2022-06-29 16:07:38 +09:00
|
|
|
minWidth: 210,
|
2021-12-30 21:47:48 +09:00
|
|
|
});
|
|
|
|
|
2023-01-15 08:07:11 +09:00
|
|
|
provide('splited', true);
|
|
|
|
|
2021-12-30 21:47:48 +09:00
|
|
|
const minWidth = props.minWidth + 'px';
|
|
|
|
</script>
|
|
|
|
|
2023-01-15 08:07:11 +09:00
|
|
|
<style lang="scss" module>
|
|
|
|
.root {
|
2021-12-30 21:47:48 +09:00
|
|
|
display: grid;
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(v-bind('minWidth'), 1fr));
|
|
|
|
grid-gap: 12px;
|
|
|
|
}
|
|
|
|
</style>
|