Skip to content

Commit 4a95314

Browse files
committed
cleanup: Parameters Accordions
1 parent 6cd4445 commit 4a95314

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/components/rightSidePanel/layout/RightPanelSection.vue renamed to src/components/rightSidePanel/layout/PropertiesAccordionItem.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,44 @@ import { watch } from 'vue'
33
44
import { cn } from '@/utils/tailwindUtil'
55
6-
const props = defineProps<{
6+
const { label, defaultCollapse } = defineProps<{
77
label?: string
88
defaultCollapse?: boolean
99
}>()
1010
const isCollapse = defineModel<boolean>('collapse', { default: false })
1111
12-
if (props.defaultCollapse) {
12+
if (defaultCollapse) {
1313
isCollapse.value = true
1414
}
1515
watch(
16-
() => props.defaultCollapse,
16+
() => defaultCollapse,
1717
(value) => (isCollapse.value = value)
1818
)
1919
</script>
2020

2121
<template>
2222
<div class="flex flex-col">
2323
<div
24-
class="sticky top-0 z-10 flex items-center justify-between backdrop-blur-xl min-h-12"
24+
class="sticky top-0 z-10 flex items-center justify-between backdrop-blur-xl"
2525
>
2626
<button
2727
class="group min-h-12 bg-transparent border-0 outline-0 ring-0 w-full text-left flex items-center justify-between pl-4 pr-3 cursor-pointer"
2828
@click="isCollapse = !isCollapse"
2929
>
3030
<span class="text-sm font-semibold line-clamp-2">
3131
<slot name="label">
32-
{{ props.label ?? '' }}
32+
{{ label ?? '' }}
3333
</slot>
3434
</span>
3535

3636
<i
3737
:class="
3838
cn(
39-
'icon-[lucide--chevron-down] size-5 min-w-5 transition-all',
40-
isCollapse && 'rotate-90'
39+
'icon-[lucide--chevron-up] size-4 transition-all',
40+
isCollapse && '-rotate-180'
4141
)
4242
"
43-
class="relative top-px text-xs leading-none text-node-component-header-icon group-hover:text-base-foreground"
43+
class="text-muted-foreground group-hover:text-base-foreground group-focus:text-base-foreground"
4444
/>
4545
</button>
4646
</div>

src/components/rightSidePanel/parameters/SectionWidgets.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useCanvasStore } from '@/renderer/core/canvas/canvasStore'
77
import WidgetLegacy from '@/renderer/extensions/vueNodes/widgets/components/WidgetLegacy.vue'
88
import { getComponent } from '@/renderer/extensions/vueNodes/widgets/registry/widgetRegistry'
99
10-
import RightPanelSection from '../layout/RightPanelSection.vue'
10+
import PropertiesAccordionItem from '../layout/PropertiesAccordionItem.vue'
1111
1212
defineProps<{
1313
label?: string
@@ -34,7 +34,7 @@ function onWidgetValueChange(
3434
</script>
3535

3636
<template>
37-
<RightPanelSection>
37+
<PropertiesAccordionItem>
3838
<template #label>
3939
<slot name="label">
4040
{{ label ?? $t('rightSidePanel.inputs') }}
@@ -66,5 +66,5 @@ function onWidgetValueChange(
6666
/>
6767
</div>
6868
</div>
69-
</RightPanelSection>
69+
</PropertiesAccordionItem>
7070
</template>

0 commit comments

Comments
 (0)