with Storybook
1. Intro
2. Typical story structure
3. Args
4. moduleMetadata
5. Formats (TS vs MDX)
6. Live coding
// Imports
import { Meta, Story } from '@storybook/angular';
import { action } from '@storybook/addon-actions';
import { HBChildTogglePhotoComponent } from './hb-child-toggle-photo.component';
// Meta
export default {
title: 'JS Stories/components/HBChildTogglePhotoComponent',
component: HBChildTogglePhotoComponent,
} as Meta;
// Template
const DefaultTemplate: Story = (args) => ({
props: args,
});
// Stories
export const Default = DefaultTemplate.bind({});
Default.args = {
picture: 'https://loremflickr.com/640/640',
clickListener: action('clickListener'),
};
oleksandr.hutsulyak@techmagic.co
kami_lviv