💻 | Update all components with Composition API and TypeScript & Add images

This commit is contained in:
2021-03-22 21:48:26 +01:00
parent f2d420a87a
commit 03db9ff299
49 changed files with 770 additions and 69 deletions

View File

@@ -0,0 +1,44 @@
<template>
<h1
class="mt-16 md:mt-32 font-bold text-2xl md:text-4xl mr-2 inline mb-4 border-b-2 border-solid"
:class="getColor"
>
{{ this.$t(title) }}
<slot />
</h1>
</template>
<script lang="ts">
import {computed} from "@nuxtjs/composition-api";
interface TitleProps {
title: string,
color: string
}
export default {
name: "PageTitle",
props: {
title: {
default: 'Title',
type: String
},
color: {
default: 'red',
type: String
}
},
setup(props: TitleProps) {
const getColor = computed(() => `border-${props.color}-400`)
return {
getColor
}
}
}
</script>
<style scoped>
</style>