27 lines
345 B
Vue
27 lines
345 B
Vue
<script setup lang="ts">
|
|
withDefaults(
|
|
defineProps<{
|
|
tag?: string;
|
|
text: string;
|
|
css?: string;
|
|
}>(),
|
|
{
|
|
tag: 'p',
|
|
css: ''
|
|
}
|
|
);
|
|
</script>
|
|
|
|
<template>
|
|
<component
|
|
:is="tag"
|
|
v-for="(line, i) in text.split('\n')"
|
|
:key="i"
|
|
:class="css"
|
|
>
|
|
{{ line }}
|
|
</component>
|
|
</template>
|
|
|
|
<style scoped></style>
|