14 lines
512 B
Vue
14 lines
512 B
Vue
<script setup lang="ts">
|
|
import { safeUrl } from './support';
|
|
|
|
defineProps<{ buttons?: { label?: string; url?: string; style?: string }[] }>();
|
|
</script>
|
|
|
|
<template>
|
|
<p v-if="buttons && buttons.length" class="mb-buttons">
|
|
<template v-for="(button, index) in buttons" :key="index">
|
|
<a v-if="button.label" :class="['mb-btn', button.style === 'secondary' ? 'mb-btn--secondary' : 'mb-btn--primary']" :href="safeUrl(button.url)">{{ button.label }}</a>
|
|
</template>
|
|
</p>
|
|
</template>
|