feat: add extra prop for message center text
This commit is contained in:
parent
a1814ea29d
commit
1fc1c20c87
2 changed files with 21 additions and 3 deletions
|
@ -1,18 +1,36 @@
|
|||
<template>
|
||||
<div class="message-wrapper">
|
||||
<div class="message" :class="variant">
|
||||
<div class="message" :class="[variant, textAlignClass]">
|
||||
<slot/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
defineProps({
|
||||
import {computed} from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
variant: {
|
||||
type: String,
|
||||
default: 'info',
|
||||
},
|
||||
textAlign: {
|
||||
type: String,
|
||||
default: 'left',
|
||||
},
|
||||
})
|
||||
|
||||
const textAlignClass = computed(() => {
|
||||
switch (props.textAlign) {
|
||||
case 'left':
|
||||
return ''
|
||||
case 'right':
|
||||
return 'has-text-right'
|
||||
case 'center':
|
||||
return 'has-text-centered'
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<message variant="success" class="has-text-centered mb-4" v-if="confirmedEmailSuccess">
|
||||
<message variant="success" text-align="center" class="mb-4" v-if="confirmedEmailSuccess">
|
||||
{{ $t('user.auth.confirmEmailSuccess') }}
|
||||
</message>
|
||||
<message variant="danger" v-if="errorMessage" class="mb-4">
|
||||
|
|
Loading…
Reference in a new issue