mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-24 00:09:32 +00:00
## Summary Automated initial change, cleaned up manually. Please check the screenshot changes. Includes a11y updates to icon buttons. Doesn't hit the buttons in Desktop. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7649-WIP-Component-The-Rest-of-the-PrimeVue-buttons-2ce6d73d365081d68e06f200f1321267) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
58 lines
1.2 KiB
Vue
58 lines
1.2 KiB
Vue
<template>
|
|
<div class="no-results-placeholder h-full p-8" :class="props.class">
|
|
<Card>
|
|
<template #content>
|
|
<div class="flex flex-col items-center">
|
|
<i :class="icon" style="font-size: 3rem; margin-bottom: 1rem" />
|
|
<h3>{{ title }}</h3>
|
|
<p :class="textClass" class="text-center whitespace-pre-line">
|
|
{{ message }}
|
|
</p>
|
|
<Button
|
|
v-if="buttonLabel"
|
|
variant="textonly"
|
|
@click="$emit('action')"
|
|
>
|
|
{{ buttonLabel }}
|
|
</Button>
|
|
</div>
|
|
</template>
|
|
</Card>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Card from 'primevue/card'
|
|
|
|
import Button from '@/components/ui/button/Button.vue'
|
|
|
|
const props = defineProps<{
|
|
class?: string
|
|
icon?: string
|
|
title: string
|
|
message: string
|
|
textClass?: string
|
|
buttonLabel?: string
|
|
}>()
|
|
|
|
defineEmits(['action'])
|
|
</script>
|
|
|
|
<style scoped>
|
|
.no-results-placeholder :deep(.p-card) {
|
|
background-color: var(--surface-ground);
|
|
text-align: center;
|
|
box-shadow: unset;
|
|
}
|
|
|
|
.no-results-placeholder h3 {
|
|
color: var(--text-color);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.no-results-placeholder p {
|
|
color: var(--text-color-secondary);
|
|
margin-bottom: 1rem;
|
|
}
|
|
</style>
|