import type { Meta, StoryObj } from '@storybook/html'; import { Stepper, type StepperOptions } from '@42/core/stepper'; import '@42/styles/stepper.css'; import '@42/styles/button.css'; import '@42/styles/card.css'; const WIZARD_CSS = ` `; const meta: Meta = { title: 'Core/Navigation/Stepper/Wizard Cards', tags: ['autodocs'], argTypes: { linear: { control: 'boolean' }, }, args: { linear: true }, render: (args) => { const wrapper = document.createElement('div'); wrapper.classList.add('wizard'); wrapper.innerHTML = `${WIZARD_CSS} ✓ Sender Edit Sender: Laravel42 Sender name Reply-to email Next ✓ Recipients Manage 3 unique recipients Mailing list Back Next Subject Edit Add a subject to the campaign Subject line Testing Preheader The preheader is the short summary text that follows the subject line in the inbox. Back Next Content Edit Design your email body Template Back Send campaign `; const root = wrapper.querySelector('[data-c42-stepper]')!; const stepper = new Stepper(root, { ...args, defaultValue: 'subject' }); // Wire next/prev buttons inside each step panel wrapper.querySelectorAll('[data-next]').forEach((btn) => { btn.addEventListener('click', () => stepper.next()); }); wrapper.querySelectorAll('[data-prev]').forEach((btn) => { btn.addEventListener('click', () => stepper.prev()); }); return wrapper; }, }; export default meta; type Story = StoryObj; export const Default: Story = {}; export const FromStart: Story = { args: { defaultValue: 'sender' } };
Sender: Laravel42
3 unique recipients
Add a subject to the campaign
The preheader is the short summary text that follows the subject line in the inbox.
Design your email body