aboutsummaryrefslogtreecommitdiffstats
path: root/components/Panel.vue
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2025-01-21 01:21:09 +0000
committerLeonardo Bishop <me@leonardobishop.com>2025-01-21 01:21:09 +0000
commit5d162cb8e0f5d594905a56a9b16f4f68df5f6631 (patch)
treecd244bada4f4749a62cf8f8bd533ab54b585fb8f /components/Panel.vue
parentbfb60f146724219379879468802ee65d02746156 (diff)
Improve frontend
Diffstat (limited to 'components/Panel.vue')
-rw-r--r--components/Panel.vue29
1 files changed, 26 insertions, 3 deletions
diff --git a/components/Panel.vue b/components/Panel.vue
index 007d2b6..8e72414 100644
--- a/components/Panel.vue
+++ b/components/Panel.vue
@@ -1,15 +1,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">
+ <div class="card" :class="kind">
<slot />
</div>
</template>
<style>
.card {
- background-color: white;
padding: 1rem;
border-radius: 0.5rem;
- /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06); */
+}
+
+.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> \ No newline at end of file