From 666484ae265194dc1512cb4f84f53ab928f5482b Mon Sep 17 00:00:00 2001 From: John Leider Date: Wed, 12 Jun 2024 13:11:13 -0500 Subject: [PATCH] fix(VExpansionPanel): propagate defaults provided by VExpansionPanels --- .../VExpansionPanel/VExpansionPanel.tsx | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.tsx b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.tsx index 881a6f6c0c4..45c22192410 100644 --- a/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.tsx +++ b/packages/vuetify/src/components/VExpansionPanel/VExpansionPanel.tsx @@ -2,6 +2,7 @@ import { VExpansionPanelSymbol } from './shared' import { makeVExpansionPanelTextProps, VExpansionPanelText } from './VExpansionPanelText' import { makeVExpansionPanelTitleProps, VExpansionPanelTitle } from './VExpansionPanelTitle' +import { VDefaultsProvider } from '@/components/VDefaultsProvider' // Composables import { useBackgroundColor } from '@/composables/color' @@ -11,7 +12,7 @@ import { makeRoundedProps, useRounded } from '@/composables/rounded' import { makeTagProps } from '@/composables/tag' // Utilities -import { computed, provide } from 'vue' +import { computed, provide, toRef } from 'vue' import { genericComponent, propsFactory, useRender } from '@/util' export const makeVExpansionPanelProps = propsFactory({ @@ -101,25 +102,30 @@ export const VExpansionPanel = genericComponent()({ ]} /> - { hasTitle && ( - - { slots.title ? slots.title() : props.title } - - )} - - { hasText && ( - - { slots.text ? slots.text() : props.text } - - )} - - { slots.default?.() } + + { hasTitle && ( + + { slots.title ? slots.title() : props.title } + + )} + + { hasText && ( + + { slots.text ? slots.text() : props.text } + + )} + + { slots.default?.() } + ) })