mirror of
https://github.com/fmhy/edit.git
synced 2026-02-18 09:11:33 +11:00
comment
This commit is contained in:
parent
4c4b225a27
commit
4281fabd71
1 changed files with 7 additions and 1 deletions
|
|
@ -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>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue