File tree 1 file changed +14
-6
lines changed
packages/vuetify/src/components/VExpansionPanel
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
1
// Components
2
2
import { VExpansionPanelSymbol } from './shared'
3
+ import { VDefaultsProvider } from '@/components/VDefaultsProvider'
3
4
import { VIcon } from '@/components/VIcon'
4
5
5
6
// Composables
@@ -75,6 +76,8 @@ export const VExpansionPanelTitle = genericComponent<VExpansionPanelTitleSlots>(
75
76
readonly : props . readonly ,
76
77
} ) )
77
78
79
+ const icon = computed ( ( ) => expansionPanel . isSelected . value ? props . collapseIcon : props . expandIcon )
80
+
78
81
useRender ( ( ) => (
79
82
< button
80
83
class = { [
@@ -103,12 +106,17 @@ export const VExpansionPanelTitle = genericComponent<VExpansionPanelTitleSlots>(
103
106
{ slots . default ?.( slotProps . value ) }
104
107
105
108
{ ! props . hideActions && (
106
- < span class = "v-expansion-panel-title__icon" >
107
- {
108
- slots . actions ? slots . actions ( slotProps . value )
109
- : < VIcon icon = { expansionPanel . isSelected . value ? props . collapseIcon : props . expandIcon } />
110
- }
111
- </ span >
109
+ < VDefaultsProvider
110
+ defaults = { {
111
+ VIcon : {
112
+ icon : icon . value ,
113
+ } ,
114
+ } }
115
+ >
116
+ < span class = "v-expansion-panel-title__icon" >
117
+ { slots . actions ?.( slotProps . value ) ?? < VIcon /> }
118
+ </ span >
119
+ </ VDefaultsProvider >
112
120
) }
113
121
</ button >
114
122
) )
You can’t perform that action at this time.
0 commit comments