From 30e422cfbfe5ad9362aeaa3abf26030cb13204b7 Mon Sep 17 00:00:00 2001 From: Krecik Date: Fri, 28 Aug 2020 14:05:43 +0200 Subject: [PATCH] fix(default-theme): display text next to image in block (#1056) --- .../cms/blocks/CmsBlockTextOnImage.vue | 54 +++++++++++++++---- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/packages/default-theme/cms/blocks/CmsBlockTextOnImage.vue b/packages/default-theme/cms/blocks/CmsBlockTextOnImage.vue index 50093e340..870793e9b 100644 --- a/packages/default-theme/cms/blocks/CmsBlockTextOnImage.vue +++ b/packages/default-theme/cms/blocks/CmsBlockTextOnImage.vue @@ -1,9 +1,12 @@ @@ -29,20 +32,53 @@ export default { getSlots() { return this.content.slots || [] }, - getContent() { - return this.getSlots.length && this.getSlots[0] + + getLeftContent() { + return this.getSlots.find(({ slot }) => slot === "left") + }, + getRightContent() { + return this.getSlots.find(({ slot }) => slot === "right") }, }, }