Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m42s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m3s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m32s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m9s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m41s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 6m5s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 4m57s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 4m59s
CI / Build-Artefakte aktuell (pull_request) Failing after 1m35s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
23 lines
1,013 B
Vue
23 lines
1,013 B
Vue
<script setup>
|
|
import { inject } from 'vue';
|
|
import { ArrowUpRight } from '@lucide/vue';
|
|
import { Button } from '@/components/ui/button';
|
|
|
|
defineProps({ block: { type: Object, required: true } });
|
|
|
|
const variants = { primary: 'default', outline: 'outline', link: 'link' };
|
|
|
|
const editing = inject('pagebuilder:editing', false);
|
|
</script>
|
|
|
|
<template>
|
|
<div class="flex flex-wrap gap-3" :class="{ 'justify-center': block.data.align === 'center' }">
|
|
<Button v-for="(button, index) in block.data.buttons" :key="index" :variant="variants[button.variant] ?? 'default'" as-child>
|
|
<a :href="button.url || '#'" :target="button.new_tab ? '_blank' : undefined" :rel="button.new_tab ? 'noopener' : undefined">
|
|
{{ button.label || 'Schaltfläche' }}
|
|
<ArrowUpRight v-if="button.new_tab" />
|
|
</a>
|
|
</Button>
|
|
<p v-if="editing && !block.data.buttons.length" class="text-sm text-muted-foreground">Noch keine Schaltflächen.</p>
|
|
</div>
|
|
</template>
|