mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-11-15 10:08:39 +05:30
35 lines
614 B
Vue
35 lines
614 B
Vue
<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>
|