feat:#16 added frontend button

This commit is contained in:
Elmar Kresse
2024-11-04 15:59:28 +01:00
parent 42172fb0a5
commit 3265c5515f
3 changed files with 62 additions and 3 deletions

View File

@@ -30,6 +30,18 @@ defineProps<{
disabled: boolean;
onClick: () => void;
};
upperButton?: {
label: string;
icon: string;
disabled: boolean;
onClick: () => void;
};
lowerButton?: {
label: string;
icon: string;
disabled: boolean;
onClick: () => void;
};
}>();
const slots = useSlots();
@@ -98,6 +110,23 @@ const hasContent = computed(() => {
@click="button.onClick()"
/>
</div>
<div
v-if="lowerButton"
class="flex flex-wrap my-3 gap-2 align-items-center justify-content-end"
>
<Button
:disabled="lowerButton.disabled"
class="col-12 md:col-4"
:icon="lowerButton.icon"
:label="lowerButton.label"
@click="lowerButton.onClick()"
/>
</div>
<div
v-if="button"
class="flex flex-wrap my-3 gap-2 align-items-center justify-content-end"
>
</div>
</div>
</div>
</template>