Skip to content

Commit

Permalink
Sort Template Builder Stories (#25161)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmontes authored Jun 6, 2023
1 parent 92be5d2 commit 3a38d50
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
7 changes: 7 additions & 0 deletions core-web/libs/template-builder/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const parameters = {
options: {
storySort: {
order: ['Template Builder', 'Components']
}
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { moduleMetadata, Story, Meta } from '@storybook/angular';

import { AddWidgetComponent } from './add-widget.component';

import { rowIcon } from '../../assets/icons';
import { rowIcon, colIcon } from '../../assets/icons';

export default {
title: 'AddWidgetComponent',
title: 'Components/Add',
component: AddWidgetComponent,
decorators: [
moduleMetadata({
Expand All @@ -18,16 +18,23 @@ const Template: Story<AddWidgetComponent> = (args: AddWidgetComponent) => ({
props: args
});

export const Primary = Template.bind({});
export const AddRow = Template.bind({});

export const AddBox = Template.bind({});

export const MaterialIcon = Template.bind({});

Primary.args = {
AddRow.args = {
label: 'Add Row',
icon: rowIcon
};

MaterialIcon.args = {
AddBox.args = {
label: 'Add Box',
icon: colIcon
};

MaterialIcon.args = {
label: 'Fallback Material Icon',
icon: 'add'
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ScrollPanelModule } from 'primeng/scrollpanel';
import { TemplateBuilderBoxComponent } from './template-builder-box.component';

export default {
title: 'TemplateBuilderBoxComponent',
title: 'Components/Box',
component: TemplateBuilderBoxComponent,
decorators: [
moduleMetadata({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { DotIconModule } from '@dotcms/ui';
import { TemplateBuilderRowComponent } from './template-builder-row.component';

export default {
title: 'TemplateBuilderRowComponent',
title: 'Components/Row',
component: TemplateBuilderRowComponent,
decorators: [
moduleMetadata({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { TemplateBuilderComponent } from './template-builder.component';
import { FULL_DATA_MOCK } from './utils/mocks';

export default {
title: 'TemplateBuilderComponent',
title: 'Template Builder',
component: TemplateBuilderComponent,
decorators: [
moduleMetadata({
Expand All @@ -34,8 +34,8 @@ const Template: Story<TemplateBuilderComponent> = (args: TemplateBuilderComponen
props: args
});

export const Primary = Template.bind({});
export const Base = Template.bind({});

Primary.args = {
Base.args = {
templateLayout: { body: FULL_DATA_MOCK }
};

0 comments on commit 3a38d50

Please sign in to comment.