From 7e8ca53ad036d7816e41a0e58624ab96e07cdadc Mon Sep 17 00:00:00 2001 From: anagarwa Date: Tue, 23 Jul 2024 10:20:28 +0530 Subject: [PATCH] fix: updating custom image component --- component-definition.json | 16 ++++++++++++++-- component-filters.json | 2 +- component-models.json | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/component-definition.json b/component-definition.json index dac20f6ac..5ec39ac0e 100644 --- a/component-definition.json +++ b/component-definition.json @@ -31,13 +31,25 @@ { "title": "Image", "id": "image", + "plugins": { + "xwalk": { + "page": { + "resourceType": "core/franklin/components/image/v1/image", + "template": {} + } + } + } + }, + { + "title": "Image Slide", + "id": "image-slide", "plugins": { "xwalk": { "page": { "resourceType": "core/franklin/components/image/v1/image", "template": { - "name": "Image", - "model": "image", + "name": "Image Slide", + "model": "image-slide", "image": "/content/dam/aem-xwalk-test-harsh/content-at-scale.png", "imageAlt": "Sample Image" } diff --git a/component-filters.json b/component-filters.json index c0b412a4c..c1f906914 100644 --- a/component-filters.json +++ b/component-filters.json @@ -51,7 +51,7 @@ { "id": "image-carousel", "components": [ - "image" + "image-slide" ] }, { diff --git a/component-models.json b/component-models.json index ef90ca46c..a618be336 100644 --- a/component-models.json +++ b/component-models.json @@ -63,6 +63,25 @@ } ] }, + { + "id": "image-slide", + "fields": [ + { + "component": "reference", + "valueType": "string", + "name": "image", + "label": "Image", + "multi": false + }, + { + "component": "text", + "valueType": "string", + "name": "imageAlt", + "value": "Default alt", + "label": "Alt Text" + } + ] + }, { "id": "button", "fields": [