mirror of
https://github.com/ArthurDanjou/website-old.git
synced 2026-01-27 02:10:36 +01:00
💻 | Working so hard on the design review
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<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"
|
||||
class="mt-16 md:mt-32 font-bold text-2xl md:text-4xl mr-2 inline mb-4 border-b-2 border-solid border-gray-200 dark:border-gray-800"
|
||||
>
|
||||
{{ this.$t(title) }}
|
||||
<slot />
|
||||
@@ -9,31 +8,12 @@
|
||||
</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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user