feat(AppFooter): optional color
This commit is contained in:
@@ -1,11 +1,26 @@
|
||||
<template>
|
||||
<ion-footer>
|
||||
<ion-footer class="shadow-none">
|
||||
<ion-toolbar class="bg-transparent">
|
||||
<ion-title class="text-white w-full text-center text-sm mb-4">PT Karya Digital Manufacturing</ion-title>
|
||||
<ion-title class="w-full text-center text-sm mb-4" :class="getTextColor()">PT Karya Digital
|
||||
Manufacturing</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-footer>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { IonFooter, IonTitle, IonToolbar } from '@ionic/vue';
|
||||
const props = defineProps({
|
||||
color: { type: String, default: 'neutral' }
|
||||
})
|
||||
|
||||
function getTextColor() {
|
||||
const { color } = props;
|
||||
if (color === 'black') {
|
||||
return 'text-black'
|
||||
}
|
||||
if (color === 'white') {
|
||||
return 'text-white'
|
||||
}
|
||||
return `text-${color}-500`
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user