File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
packages/vuetify/src/components/VCard Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 1
1
// Composables
2
2
import { makeComponentProps } from '@/composables/component'
3
3
import { provideDefaults } from '@/composables/defaults'
4
+ import { makeTagProps } from '@/composables/tag'
4
5
5
6
// Utilities
6
- import { genericComponent , useRender } from '@/util'
7
+ import { genericComponent , propsFactory , useRender } from '@/util'
8
+
9
+ export const makeVCardActionsProps = propsFactory ( {
10
+ ...makeComponentProps ( ) ,
11
+ ...makeTagProps ( ) ,
12
+ } , 'VCardActions' )
7
13
8
14
export const VCardActions = genericComponent ( ) ( {
9
15
name : 'VCardActions' ,
10
16
11
- props : makeComponentProps ( ) ,
17
+ props : makeVCardActionsProps ( ) ,
12
18
13
19
setup ( props , { slots } ) {
14
20
provideDefaults ( {
@@ -19,15 +25,14 @@ export const VCardActions = genericComponent()({
19
25
} )
20
26
21
27
useRender ( ( ) => (
22
- < div
28
+ < props . tag
23
29
class = { [
24
30
'v-card-actions' ,
25
31
props . class ,
26
32
] }
27
33
style = { props . style }
28
- >
29
- { slots . default ?.( ) }
30
- </ div >
34
+ v-slots = { slots }
35
+ />
31
36
) )
32
37
33
38
return { }
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { VIcon } from '@/components/VIcon'
9
9
import { makeComponentProps } from '@/composables/component'
10
10
import { makeDensityProps } from '@/composables/density'
11
11
import { IconValue } from '@/composables/icons'
12
+ import { makeTagProps } from '@/composables/tag'
12
13
13
14
// Utilities
14
15
import { toDisplayString } from 'vue'
@@ -38,6 +39,7 @@ export const makeCardItemProps = propsFactory({
38
39
39
40
...makeComponentProps ( ) ,
40
41
...makeDensityProps ( ) ,
42
+ ...makeTagProps ( ) ,
41
43
} , 'VCardItem' )
42
44
43
45
export const VCardItem = genericComponent < VCardItemSlots > ( ) ( {
@@ -55,7 +57,7 @@ export const VCardItem = genericComponent<VCardItemSlots>()({
55
57
const hasSubtitle = ! ! ( props . subtitle != null || slots . subtitle )
56
58
57
59
return (
58
- < div
60
+ < props . tag
59
61
class = { [
60
62
'v-card-item' ,
61
63
props . class ,
@@ -157,7 +159,7 @@ export const VCardItem = genericComponent<VCardItemSlots>()({
157
159
) }
158
160
</ div >
159
161
) }
160
- </ div >
162
+ </ props . tag >
161
163
)
162
164
} )
163
165
You can’t perform that action at this time.
0 commit comments