mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Vladimir Sheremet <sleuths.slews0s@icloud.com>
46 lines
714 B
Vue
46 lines
714 B
Vue
<script setup lang="ts">
|
|
import { ref } from 'vue'
|
|
|
|
defineProps<{
|
|
color?: string
|
|
}>()
|
|
|
|
const open = ref(true)
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
:open="open"
|
|
class="details-panel"
|
|
data-testid="details-panel"
|
|
@toggle="open = ($event.target as any).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>
|