This commit is contained in:
maropboia 2024-05-03 11:38:27 +06:00
parent 4c4b225a27
commit 4281fabd71

View file

@ -1,16 +1,22 @@
<script setup lang="ts"> <script setup lang="ts">
// Define a prop named 'icon' of type string
defineProps<{ defineProps<{
icon: string icon: string
}>() }>()
</script> </script>
<template> <template>
<!-- Template section for the component's layout -->
<div class="flex items-center mb-[8px] g-[12px]"> <div class="flex items-center mb-[8px] g-[12px]">
<!-- Flex container for the icon and the slot content -->
<span class="flex items-center"> <span class="flex items-center">
<!-- Container for the icon with a specific size and class based on the 'icon' prop -->
<div class="text-2xl" :class="icon" /> <div class="text-2xl" :class="icon" />
<!-- Slot for the component's content with a class for text styling -->
<div class="ml-2 text-sm text-[var(--vp-c-text-2)]"> <div class="ml-2 text-sm text-[var(--vp-c-text-2)]">
<slot /> <slot /> <!-- The content provided when using the component -->
</div> </div>
</span> </span>
</div> </div>
</template> </template>