From e4c1b8ff4e7dc8ec15c8920188c52732369d0fa3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Feb 2023 13:55:08 -0300 Subject: [PATCH] feat: adiciona a estrutura do tab-layout no bloco json --- store/blocks/pdp/product.jsonc | 114 +++++++++++++++++++++++++++++---- 1 file changed, 100 insertions(+), 14 deletions(-) diff --git a/store/blocks/pdp/product.jsonc b/store/blocks/pdp/product.jsonc index 7c06a5c..58b114b 100644 --- a/store/blocks/pdp/product.jsonc +++ b/store/blocks/pdp/product.jsonc @@ -3,9 +3,7 @@ "children": [ "html#breadcrumb", "condition-layout.product#availability", - // "flex-layout.row#description", - // "flex-layout.row#specifications-title", - // "product-specification-group#table", + "tab-layout#description", "shelf.relatedProducts", "product-questions-and-answers" ] @@ -18,21 +16,109 @@ }, "children": ["breadcrumb"] }, - "flex-layout.row#specifications-title": { - "children": ["rich-text#specifications"] - }, - "rich-text#specifications": { + + "tab-layout#description": { + "children": ["tab-list#description", "tab-content#description"], "props": { - "text": "##### Product Specifications" + "blockClass": "description", + "defaultActiveTabId": "description1" } }, - // "flex-layout.row#description": { - // "props": { - // "marginBottom": 7 - // }, - // "children": ["product-description"] - // }, + "tab-list#description": { + "children": [ + "tab-list.item#description1", + "tab-list.item#description2", + "tab-list.item#description3", + "tab-list.item#description4", + "tab-list.item#description5" + ] + }, + + "tab-list.item#description1": { + "props": { + "tabId": "description1", + "label": "Descrição", + "defaultActiveTab": true + } + }, + + "tab-list.item#description2": { + "props": { + "tabId": "description2", + "label": "Descrição", + "defaultActiveTab": false + } + }, + + "tab-list.item#description3": { + "props": { + "tabId": "description3", + "label": "Descrição", + "defaultActiveTab": false + } + }, + + "tab-list.item#description4": { + "props": { + "tabId": "description4", + "label": "Descrição", + "defaultActiveTab": false + } + }, + + "tab-list.item#description5": { + "props": { + "tabId": "description5", + "label": "Descrição", + "defaultActiveTab": false + } + }, + + "tab-content#description": { + "children": [ + "tab-content.item#description1", + "tab-content.item#description2", + "tab-content.item#description3", + "tab-content.item#description4", + "tab-content.item#description5" + ] + }, + + "tab-content.item#description1": { + "children": ["product-images", "product-description"], + "props": { + "tabId": "description1" + } + }, + + "tab-content.item#description2": { + "children": ["product-images", "product-description"], + "props": { + "tabId": "description2" + } + }, + + "tab-content.item#description3": { + "children": ["product-images", "product-description"], + "props": { + "tabId": "description3" + } + }, + + "tab-content.item#description4": { + "children": ["product-images", "product-description"], + "props": { + "tabId": "description4" + } + }, + + "tab-content.item#description5": { + "children": ["product-images", "product-description"], + "props": { + "tabId": "description5" + } + }, "condition-layout.product#availability": { "props": {