vitest/packages/ui/client/components/DetailsPanel.vue
Gergő Takács 7f59a1b858
feat(ui): show unhandled errors on the ui (#4380)
Co-authored-by: Vladimir <sleuths.slews0s@icloud.com>
2024-01-12 16:06:35 +01:00

26 lines
582 B
Vue

<script setup lang="ts">
defineProps<{
color?: string
}>()
const open = ref(true)
</script>
<template>
<div :open="open" class="details-panel" data-testid="details-panel" @toggle="open = $event.target.open">
<div p="y1" text-sm bg-base items-center z-5 gap-2 :class="color" w-full flex select-none sticky top="-1">
<div flex-1 h-1px border="base b" op80 />
<slot name="summary" :open="open" />
<div flex-1 h-1px border="base b" op80 />
</div>
<slot />
</div>
</template>
<style>
.details-panel {
user-select: none;
width: 100%;
}
</style>