2
2
import { VExpansionPanelSymbol } from './shared'
3
3
import { makeVExpansionPanelTextProps , VExpansionPanelText } from './VExpansionPanelText'
4
4
import { makeVExpansionPanelTitleProps , VExpansionPanelTitle } from './VExpansionPanelTitle'
5
+ import { VDefaultsProvider } from '@/components/VDefaultsProvider'
5
6
6
7
// Composables
7
8
import { useBackgroundColor } from '@/composables/color'
@@ -11,7 +12,7 @@ import { makeRoundedProps, useRounded } from '@/composables/rounded'
11
12
import { makeTagProps } from '@/composables/tag'
12
13
13
14
// Utilities
14
- import { computed , provide } from 'vue'
15
+ import { computed , provide , toRef } from 'vue'
15
16
import { genericComponent , propsFactory , useRender } from '@/util'
16
17
17
18
export const makeVExpansionPanelProps = propsFactory ( {
@@ -101,25 +102,30 @@ export const VExpansionPanel = genericComponent<VExpansionPanelSlots>()({
101
102
] }
102
103
/>
103
104
104
- { hasTitle && (
105
- < VExpansionPanelTitle
106
- key = "title"
107
- { ...expansionPanelTitleProps }
108
- >
109
- { slots . title ? slots . title ( ) : props . title }
110
- </ VExpansionPanelTitle >
111
- ) }
112
-
113
- { hasText && (
114
- < VExpansionPanelText
115
- key = "text"
116
- { ...expansionPanelTextProps }
117
- >
118
- { slots . text ? slots . text ( ) : props . text }
119
- </ VExpansionPanelText >
120
- ) }
121
-
122
- { slots . default ?.( ) }
105
+ < VDefaultsProvider
106
+ defaults = { {
107
+ VExpansionPanelTitle : {
108
+ ...expansionPanelTitleProps ,
109
+ } ,
110
+ VExpansionPanelText : {
111
+ ...expansionPanelTextProps ,
112
+ } ,
113
+ } }
114
+ >
115
+ { hasTitle && (
116
+ < VExpansionPanelTitle key = "title" >
117
+ { slots . title ? slots . title ( ) : props . title }
118
+ </ VExpansionPanelTitle >
119
+ ) }
120
+
121
+ { hasText && (
122
+ < VExpansionPanelText key = "text" >
123
+ { slots . text ? slots . text ( ) : props . text }
124
+ </ VExpansionPanelText >
125
+ ) }
126
+
127
+ { slots . default ?.( ) }
128
+ </ VDefaultsProvider >
123
129
</ props . tag >
124
130
)
125
131
} )
0 commit comments