mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
## Summary See what it looks like. How it feels. What do you think? - Also was able to unify down to a single SearchBox component. ## Changes - Bigger widget / slot labels - Smaller header text - Unified Searchboxes across sidebar tabs ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7223-Style-prototype-with-larger-node-text-2c36d73d365081f8a371c86f178fa1ff) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <github-actions@github.com>
54 lines
1.5 KiB
Vue
54 lines
1.5 KiB
Vue
<template>
|
|
<div
|
|
class="comfy-vue-side-bar-container group/sidebar-tab flex h-full flex-col"
|
|
:class="props.class"
|
|
>
|
|
<div class="comfy-vue-side-bar-header flex flex-col gap-2">
|
|
<Toolbar
|
|
class="min-h-16 bg-transparent rounded-none border-x-0 border-t-0 px-2 2xl:px-4"
|
|
>
|
|
<template #start>
|
|
<span class="truncate font-bold" :title="props.title">
|
|
{{ props.title }}
|
|
</span>
|
|
<slot name="alt-title" />
|
|
</template>
|
|
<template #end>
|
|
<div
|
|
class="touch:w-auto touch:opacity-100 flex flex-row transition-all duration-200 motion-safe:w-0 motion-safe:opacity-0 motion-safe:group-focus-within/sidebar-tab:w-auto motion-safe:group-focus-within/sidebar-tab:opacity-100 motion-safe:group-hover/sidebar-tab:w-auto motion-safe:group-hover/sidebar-tab:opacity-100"
|
|
>
|
|
<slot name="tool-buttons" />
|
|
</div>
|
|
</template>
|
|
</Toolbar>
|
|
<slot name="header" />
|
|
</div>
|
|
<!-- h-0 to force scrollpanel to grow -->
|
|
<ScrollPanel class="comfy-vue-side-bar-body h-0 grow">
|
|
<slot name="body" />
|
|
</ScrollPanel>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import ScrollPanel from 'primevue/scrollpanel'
|
|
import Toolbar from 'primevue/toolbar'
|
|
|
|
const props = defineProps<{
|
|
title: string
|
|
class?: string
|
|
}>()
|
|
</script>
|
|
|
|
<style scoped>
|
|
@reference '../../../assets/css/style.css';
|
|
|
|
:deep(.p-toolbar-end) .p-button {
|
|
@apply py-1 2xl:py-2;
|
|
}
|
|
|
|
:deep(.p-toolbar-start) {
|
|
@apply min-w-0 flex-1 overflow-hidden;
|
|
}
|
|
</style>
|