aboutsummaryrefslogtreecommitdiffstats
path: root/components/Panel.vue
blob: 8e724147f53541ed01e015a2e0e3e32eda952bbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<script setup lang="ts">
import { defineProps, type PropType } from 'vue';

defineProps({
  kind: {
    type: String as PropType<"normal" | "error" | "success">,
    required: false,
    default: 'normal',
  },
});
</script>
<template>
  <div class="card" :class="kind">
    <slot />
  </div>
</template>

<style>
.card {
  padding: 1rem; 
  border-radius: 0.5rem; 
}

.normal {
  background-color: white;
  border: 0.1rem solid var(--color-border);
}

.error {
  background-color: var(--color-error);
  border: 0.1rem solid var(--color-border-error);
}

.success {
  background-color: var(--color-success);
  border: 0.1rem solid var(--color-border-success);
}
</style>