From 8e1354d0997bf79d8c40ef0cfa16f4d59db8234a Mon Sep 17 00:00:00 2001 From: mertsincan Date: Wed, 3 Jan 2024 11:06:19 +0000 Subject: [PATCH] Fixed #5020 - Add caption option to passthrough options on Card --- components/lib/card/Card.d.ts | 4 ++++ components/lib/card/Card.vue | 12 +++++++----- components/lib/card/style/CardStyle.js | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/components/lib/card/Card.d.ts b/components/lib/card/Card.d.ts index 816fb2127..f757ab3b5 100755 --- a/components/lib/card/Card.d.ts +++ b/components/lib/card/Card.d.ts @@ -31,6 +31,10 @@ export interface CardPassThroughOptions { * Used to pass attributes to the body's DOM element. */ body?: CardPassThroughOptionType; + /** + * Used to pass attributes to the caption's DOM element. + */ + caption?: CardPassThroughOptionType; /** * Used to pass attributes to the title's DOM element. */ diff --git a/components/lib/card/Card.vue b/components/lib/card/Card.vue index 32c5e3d08..7b6f94a31 100755 --- a/components/lib/card/Card.vue +++ b/components/lib/card/Card.vue @@ -4,11 +4,13 @@
-
- -
-
- +
+
+ +
+
+ +
diff --git a/components/lib/card/style/CardStyle.js b/components/lib/card/style/CardStyle.js index 0a3c98982..5b5e72abf 100644 --- a/components/lib/card/style/CardStyle.js +++ b/components/lib/card/style/CardStyle.js @@ -4,6 +4,7 @@ const classes = { root: 'p-card p-component', header: 'p-card-header', body: 'p-card-body', + caption: 'p-card-caption', title: 'p-card-title', subtitle: 'p-card-subtitle', content: 'p-card-content',