Skip to content

Commit

Permalink
nested tab config added
Browse files Browse the repository at this point in the history
  • Loading branch information
omprakashgupta1995 committed Jul 3, 2024
1 parent 0219e83 commit 8761557
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blocks/tab-name-nested/tab-name-nested.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { generateTabName } from "../tab-name/tab-name";
import { generateTabName } from "../tab-name/tab-name.js";

export default function decorate(block) {
return generateTabName(block)
Expand Down
2 changes: 1 addition & 1 deletion blocks/tab-name/tab-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function generateTabName(block) {
// const names = name.innerText.split(",");
// const ids = id.innerText.split(",");
// const classes = type.innerText.trim();
const [name, id, typename, classes, prev, next, ...imageSrc] = getProps(block, {
const [name, id, typename, classes, prev, next, nestedTabId, nestedTabActive, ...imageSrc] = getProps(block, {
index: [4, 5]
});
const names = name.split(",");
Expand Down
27 changes: 26 additions & 1 deletion component-models.json
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,31 @@
"value": "",
"label": "Set next icon on tab carousel"
},
{
"component": "text",
"valueType": "string",
"name": "nested-tab-id",
"value": "",
"label": "Nested Tab Id",
"description": "Sets the id of the nested tab."
},
{
"component": "select",
"valueType": "string",
"name": "nested-tab-isactive",
"value": "dp-none",
"label": "Is Active",
"options": [
{
"name": "Hide",
"value": "dp-none"
},
{
"name": "Active",
"value": "active"
}
]
},
{
"component": "reference",
"valueType": "string",
Expand Down Expand Up @@ -661,7 +686,7 @@
"label": "Tab Id",
"description": "Sets the id of the tab.",
"multi": true
}
}
]
},
{
Expand Down

0 comments on commit 8761557

Please sign in to comment.