Skip to content

Commit

Permalink
consume tabs WC
Browse files Browse the repository at this point in the history
  • Loading branch information
3ch023 committed Mar 27, 2024
1 parent 4c6ecbb commit 4bac4fb
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 32 deletions.
7 changes: 6 additions & 1 deletion libs/blocks/merch-twp/merch-twp.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createTag, getConfig } from '../../utils/utils.js';
import '../../deps/merch-subscription-panel.js';
import '../../deps/merch-subscription-tabs.js';
import '../../deps/merch-subscription-layout.js';

const createPanel = () => {
Expand Down Expand Up @@ -56,11 +57,15 @@ export default async function init(el) {
const { base } = getConfig();
await import(`${base}/features/spectrum-web-components/dist/theme.js`);
const layout = createTag('merch-subscription-layout', { }, '', { });
createTag('h3', { slot: 'title' }, 'Try the full version of Adobe apps with a 7-day free trial.', { parent: layout });
createTag('h5', { slot: 'sub-title' }, 'Choose a plan:', { parent: layout });
const merchCards = [...cards].map((card) => {
card.setAttribute('slot', 'cards');
return card;
});
layout.append(...merchCards);
const tabs = createTag('merch-subscription-tabs', { slot: 'tabs' }, '', {});
tabs.append(...merchCards);
layout.append(tabs);
layout.append(createPanel());
el.append(layout);
}
Expand Down
39 changes: 11 additions & 28 deletions libs/deps/merch-subscription-layout.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4bac4fb

Please sign in to comment.