Skip to content

Commit 448a69e

Browse files
committed
fix: no margins for text as span
1 parent 15a3efc commit 448a69e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/Text.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ const props = defineProps({
1818
1919
const attrs = useAttrs()
2020
21-
const mergedClass = computed(() => twMerge('m-0 my-4 text-base', attrs.class as string))
21+
const defaultClass = computed(() => props.as === 'span' ? 'text-base' : 'm-0 my-4 text-base')
22+
const mergedClass = computed(() => twMerge(defaultClass.value, attrs.class as string))
2223
</script>
2324

2425
<template>

0 commit comments

Comments
 (0)