Skip to content

Commit

Permalink
code enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
sharath-kannan committed Apr 19, 2024
1 parent 30710be commit fb8d600
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions creativecloud/blocks/interactive-marquee/interactive-marquee.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@ function decorateText(el, createTag) {
iconAreaElements?.classList.add('icon-area');
iconText.innerText = (iconAreaElements.textContent.trim());
iconText.previousSibling.textContent = '';
const foreground = el.parentElement;
const mwebContainer = document.createElement('div');
const foreground = el.closest('.foreground');
const mwebContainer = createTag('div', { class: 'mweb-container' });
const actionItem = el.querySelector('.action-area');
mwebContainer.classList.add('mweb-container');
mwebContainer.append(
sib.cloneNode(true) || document.createElement('div'),
heading.cloneNode(true),
actionItem.cloneNode(true),
);
mwebContainer.append(heading.cloneNode(true), actionItem.cloneNode(true));
if (sib) mwebContainer.prepend(sib);
foreground.prepend(mwebContainer);
};
decorate(heading, config);
Expand Down

0 comments on commit fb8d600

Please sign in to comment.