aboutsummaryrefslogtreecommitdiff
path: root/src/ui/c-card/c-card.vue
diff options
context:
space:
mode:
authorGravatar Corentin Thomasset <corentin.thomasset74@gmail.com> 2023-04-20 20:49:28 +0200
committerGravatar Corentin THOMASSET <corentin.thomasset74@gmail.com> 2023-04-20 20:57:38 +0200
commitf080933d2a6f03ef54d40b57175a1bea276df675 (patch)
treed4c0abf43da4ea910f13c1f5b4a765279d6491dc /src/ui/c-card/c-card.vue
parentbb32513bd34948b0f0a3d739c41bda303d01cf89 (diff)
downloadit-tools-f080933d2a6f03ef54d40b57175a1bea276df675.tar.gz
it-tools-f080933d2a6f03ef54d40b57175a1bea276df675.tar.zst
it-tools-f080933d2a6f03ef54d40b57175a1bea276df675.zip
refactor(ui): replaced naive ui cards with custom ones
Diffstat (limited to 'src/ui/c-card/c-card.vue')
-rw-r--r--src/ui/c-card/c-card.vue35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/ui/c-card/c-card.vue b/src/ui/c-card/c-card.vue
new file mode 100644
index 0000000..11d86fd
--- /dev/null
+++ b/src/ui/c-card/c-card.vue
@@ -0,0 +1,35 @@
+<template>
+ <div class="c-card">
+ <div v-if="title" class="c-card-title">
+ {{ title }}
+ </div>
+ <slot />
+ </div>
+</template>
+
+<script lang="ts" setup>
+import { useTheme } from './c-card.theme';
+
+const props = defineProps<{
+ title?: string;
+}>();
+
+const { title } = toRefs(props);
+
+const theme = useTheme();
+</script>
+
+<style lang="less" scoped>
+.c-card {
+ background-color: v-bind('theme.backgroundColor');
+ border: 1px solid v-bind('theme.borderColor');
+ border-radius: 4px;
+ padding: 20px 24px;
+
+ &-title {
+ font-size: 16px;
+ font-weight: 500;
+ margin-bottom: 20px;
+ }
+}
+</style>