feat(new component): Initial typography (#199)

* feat: typography

* feat: typography

* feat: typography

* Update docs/components/heading.md

* Update src/components/Typography/A.vue

* Update src/components/Typography/Heading.vue

* Update src/components/Typography/Img.vue

* Update src/components/Typography/P.vue

---------

Co-authored-by: Ilya Artamonov <ilya.sosidka@gmail.com>
This commit is contained in:
Vasu Singh
2023-09-19 15:13:47 +05:30
committed by GitHub
parent e3fc36606e
commit 7fd3b4f3a6
31 changed files with 735 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
<template>
<div>
<figure v-if="caption" :class="figClass">
<img :src="src" :alt="alt" :class="[size, alignment, imgClass]" />
<figcaption :class="captionClass">{{ caption }}</figcaption>
</figure>
<img v-else :src="src" :alt="alt" :class="[size, alignment, imgClass]" />
</div>
</template>
<script setup lang="ts">
interface ImageProps {
caption?: string
src?: string
size?: string
alt?: string
imgClass?: string
alignment?: string
captionClass?: string
figClass?: string
}
withDefaults(defineProps<ImageProps>(), {
caption: '',
src: '',
size: 'max-w-full',
alt: '',
imgClass: 'h-auto',
alignment: '',
captionClass: 'mt-2 text-sm text-center text-gray-500 dark:text-gray-400',
figClass: 'max-w-lg',
})
</script>