migrate on nuxt3

This commit is contained in:
2025-06-17 17:46:03 +04:00
parent 7634a3d616
commit 727fa976bd
123 changed files with 20963 additions and 1815 deletions

View File

@ -0,0 +1,48 @@
<template>
<component
:is="tag"
class="font-semibold"
:class="[
{
'text-3xl md:text-4xl lg:text-5xl 2xl:text-6xl': size === '600',
}, // H1
{
'text-3xl md:text-4xl 2xl:text-5xl': size === '500',
}, // H2
{
'text-2xl md:text-3xl 2xl:text-4xl': size === '400',
}, // H3
{
'text-xl lg:text-2xl 2xl:text-3xl': size === '300',
}, // H4
{
'text-lg md:text-xl': size === '200',
}, // H5
]"
>
<slot />
</component>
</template>
<script setup lang="ts">
import { toRefs } from 'vue'
const props = defineProps({
/**
* Tag name: h1 to h6
*/
tag: {
type: String,
default: 'h2',
},
/**
* Heading size: '600' (largest) to '200' (smallest)
*/
size: {
type: String,
default: '500',
},
})
const { size, tag } = toRefs(props)
</script>

View File

@ -0,0 +1,48 @@
<template>
<component
:is="as"
class="text-primary"
:class="[
{
'text-2xl lg:text-3xl 2xl:text-4xl': size === '600',
}, // 24px
{
'text-xl lg:text-2xl 2xl:text-3xl': size === '500',
}, // 20px
{
'text-lg lg:text-xl 2xl:text-2xl': size === '400',
}, // 18px
{
'text-lg lg:text-[20px]': size === '300',
}, // 16px
{
'text-[15px]': size === '250',
}, // 15px
{
'text-[13px]': size === '200',
}, // 14px
]"
>
<slot />
</component>
</template>
<script setup lang="ts">
import { toRefs } from 'vue'
const props = defineProps({
as: {
type: String,
default: 'p',
},
/**
* Tailwind text size from 600 to 200
*/
size: {
type: String,
default: '300',
},
})
const { size, as } = toRefs(props)
</script>