|
| 1 | +<script setup lang="ts"> |
| 2 | +defineProps<{ |
| 3 | + id: string |
| 4 | + title: string |
| 5 | + subtitle?: string |
| 6 | + category?: string |
| 7 | + full?: boolean |
| 8 | + footer?: string |
| 9 | +}>() |
| 10 | +</script> |
| 11 | + |
| 12 | +<template> |
| 13 | + <section |
| 14 | + :id="id" |
| 15 | + class="debug-block" |
| 16 | + :class="{ 'debug-block--full': full }" |
| 17 | + > |
| 18 | + <header class="debug-block__header"> |
| 19 | + <div class="debug-block__titles"> |
| 20 | + <h3 class="debug-block__title">{{ title }}</h3> |
| 21 | + <p v-if="subtitle" class="debug-block__subtitle">{{ subtitle }}</p> |
| 22 | + </div> |
| 23 | + <Tag v-if="category" :value="category" severity="secondary" class="debug-block__badge" /> |
| 24 | + </header> |
| 25 | + |
| 26 | + <div class="debug-block__body"> |
| 27 | + <slot /> |
| 28 | + </div> |
| 29 | + |
| 30 | + <p v-if="footer" class="debug-block__footer">{{ footer }}</p> |
| 31 | + </section> |
| 32 | +</template> |
| 33 | + |
| 34 | +<style scoped lang="scss"> |
| 35 | +.debug-block { |
| 36 | + height: fit-content; |
| 37 | + padding: 1rem; |
| 38 | + background: rgba(0, 0, 0, 0.18); |
| 39 | + border: 1px solid var(--owd-surface-700, #1d293d); |
| 40 | + border-radius: 8px; |
| 41 | +
|
| 42 | + &--full { |
| 43 | + grid-column: 1 / -1; |
| 44 | + } |
| 45 | +
|
| 46 | + &__header { |
| 47 | + display: flex; |
| 48 | + align-items: flex-start; |
| 49 | + justify-content: space-between; |
| 50 | + gap: 0.75rem; |
| 51 | + margin-bottom: 0.875rem; |
| 52 | + padding-bottom: 0.625rem; |
| 53 | + border-bottom: 1px solid var(--owd-surface-700, #1d293d); |
| 54 | + } |
| 55 | +
|
| 56 | + &__titles { |
| 57 | + display: flex; |
| 58 | + flex-direction: column; |
| 59 | + gap: 0.125rem; |
| 60 | + min-width: 0; |
| 61 | + } |
| 62 | +
|
| 63 | + &__title { |
| 64 | + margin: 0; |
| 65 | + font-size: 0.9375rem; |
| 66 | + font-weight: 600; |
| 67 | + color: var(--owd-color, #e8eef6); |
| 68 | + } |
| 69 | +
|
| 70 | + &__subtitle { |
| 71 | + margin: 0; |
| 72 | + font-size: 0.75rem; |
| 73 | + color: rgba(200, 212, 228, 0.55); |
| 74 | + } |
| 75 | +
|
| 76 | + &__badge { |
| 77 | + flex-shrink: 0; |
| 78 | + font-size: 0.65rem; |
| 79 | + text-transform: uppercase; |
| 80 | + letter-spacing: 0.04em; |
| 81 | + } |
| 82 | +
|
| 83 | + &__body { |
| 84 | + display: flex; |
| 85 | + flex-direction: column; |
| 86 | + gap: 0.75rem; |
| 87 | + } |
| 88 | +
|
| 89 | + &__footer { |
| 90 | + margin: 0.75rem 0 0; |
| 91 | + font-size: 0.75rem; |
| 92 | + color: rgba(200, 212, 228, 0.45); |
| 93 | + font-style: italic; |
| 94 | + } |
| 95 | +} |
| 96 | +</style> |
0 commit comments