blob: 739e657663314ba4628b8919f38360c691c7199a (
plain) (
blame)
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
|
<script lang="ts" setup>
import { useTheme } from './c-card.theme';
const props = defineProps<{
title?: string
}>();
const { title } = toRefs(props);
const theme = useTheme();
</script>
<template>
<div class="c-card">
<div v-if="title" class="c-card-title">
{{ title }}
</div>
<slot />
</div>
</template>
<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>
|