Move files in preparation for monorepo migration

This commit is contained in:
Jai A
2024-07-03 16:21:07 -07:00
parent 11020c4545
commit 1ef8bf4690
271 changed files with 0 additions and 164 deletions

View File

@@ -0,0 +1,59 @@
<script setup lang="ts">
import { Button, DropdownIcon } from '@'
import { reactive } from 'vue'
const props = withDefaults(
defineProps<{
collapsible: boolean
defaultCollapsed: boolean
noAutoBody: boolean
}>(),
{
collapsible: false,
defaultCollapsed: false,
noAutoBody: false,
}
)
const state = reactive({
collapsed: props.defaultCollapsed,
})
function toggleCollapsed() {
state.collapsed = !state.collapsed
}
</script>
<template>
<div class="card">
<div v-if="!!$slots.header || collapsible" class="header">
<slot name="header"></slot>
<div v-if="collapsible" class="btn-group">
<Button :action="toggleCollapsed">
<DropdownIcon :style="{ transform: `rotate(${state.collapsed ? 0 : 180}deg)` }" />
</Button>
</div>
</div>
<slot v-if="!state.collapsed" />
</div>
</template>
<style lang="scss" scoped>
.header {
display: flex;
:deep(h1, h2, h3, h4) {
margin-block: 0;
}
&:not(:last-child) {
margin-bottom: var(--gap-lg);
}
}
.btn-group {
margin-left: auto;
margin-right: 0;
}
</style>