Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5bec1d9

Browse files
committed
Created products list stories, deleted second page
1 parent 0df7649 commit 5bec1d9

11 files changed

+224
-308
lines changed

documentation.json

Lines changed: 179 additions & 227 deletions
Large diffs are not rendered by default.

src/app/molecules/product-default/product-default.component.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ProductDefaultMock } from './product-default.component.mocks';
44
import { ProductDefaultModule } from './product-default.module';
55

66
export default {
7-
title: 'Organisms/ProductDefault',
7+
title: 'Molecules/ProductDefault',
88
component: ProductDefaultComponent,
99
decorators: [
1010
moduleMetadata({

src/app/molecules/product-out-of-stock/product-out-of-stock.component.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ProductOutOfStockMock } from './product-out-of-stock.component.mocks';
44
import { ProductOutOfStockModule } from './product-out-of-stock.module';
55

66
export default {
7-
title: 'Organisms/ProductOutOfStock',
7+
title: 'Molecules/ProductOutOfStock',
88
component: ProductOutOfStockComponent,
99
decorators: [
1010
moduleMetadata({

src/app/molecules/product-replaced/product-replaced.component.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ProductReplacementMock } from './product-replaced.component.mocks';
44
import { ProductReplacedModule } from './product-replaced.module';
55

66
export default {
7-
title: 'Organisms/ProductReplaced',
7+
title: 'Molecules/ProductReplaced',
88
component: ProductReplacedComponent,
99
decorators: [
1010
moduleMetadata({

src/app/pages/page-products-dynamic/page-products-dynamic.component.stories.ts renamed to src/app/organisms/products-list-dynamic/products-list-dynamic.component.stories.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,24 @@ import { Meta, moduleMetadata, Story } from '@storybook/angular';
22
import { ProductDefaultMock } from '../../molecules/product-default/product-default.component.mocks';
33
import { ProductOutOfStockMock } from '../../molecules/product-out-of-stock/product-out-of-stock.component.mocks';
44
import { ProductReplacementMock } from '../../molecules/product-replaced/product-replaced.component.mocks';
5-
import { PageProductsDynamicComponent } from './page-products-dynamic.component';
6-
import { PageProductsDynamicModule } from './page-products-dynamic.module';
5+
import { PageProductsComponent } from '../../pages/page-products/page-products.component';
6+
import { ProductsListDynamicComponent } from './products-list-dynamic.component';
7+
import { ProductsListDynamicModule } from './products-list-dynamic.module';
78

89
export default {
9-
title: 'Pages/ProductsDynamic',
10-
component: PageProductsDynamicComponent,
10+
title: 'Organisms/ProductsListDynamic',
11+
component: ProductsListDynamicComponent,
1112
decorators: [
1213
moduleMetadata({
13-
imports: [PageProductsDynamicModule],
14+
imports: [ProductsListDynamicModule],
1415
}),
1516
],
1617
parameters: {
1718
layout: 'fullscreen',
1819
},
1920
} as Meta;
2021

21-
const Template: Story<PageProductsDynamicComponent> = (args) => ({
22+
const Template: Story<PageProductsComponent> = (args) => ({
2223
props: args,
2324
});
2425

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { Meta, moduleMetadata, Story } from '@storybook/angular';
2+
import { ProductDefaultMock } from '../../molecules/product-default/product-default.component.mocks';
3+
import { ProductOutOfStockMock } from '../../molecules/product-out-of-stock/product-out-of-stock.component.mocks';
4+
import { ProductReplacementMock } from '../../molecules/product-replaced/product-replaced.component.mocks';
5+
import { PageProductsComponent } from '../../pages/page-products/page-products.component';
6+
import { ProductsListComponent } from './products-list.component';
7+
import { ProductsListModule } from './products-list.module';
8+
9+
export default {
10+
title: 'Organisms/ProductsList',
11+
component: ProductsListComponent,
12+
decorators: [
13+
moduleMetadata({
14+
imports: [ProductsListModule],
15+
}),
16+
],
17+
parameters: {
18+
layout: 'fullscreen',
19+
},
20+
} as Meta;
21+
22+
const Template: Story<PageProductsComponent> = (args) => ({
23+
props: args,
24+
});
25+
26+
export const Primary = Template.bind({});
27+
Primary.args = {
28+
products: [
29+
ProductDefaultMock.PRIMARY,
30+
ProductDefaultMock.MIN_CONTENT,
31+
ProductOutOfStockMock.MAX_CONTENT,
32+
ProductReplacementMock.MAX_CONTENT,
33+
ProductDefaultMock.MAX_CONTENT,
34+
],
35+
};

src/app/pages/page-products-dynamic/page-products-dynamic.component.html

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/app/pages/page-products-dynamic/page-products-dynamic.component.scss

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/app/pages/page-products-dynamic/page-products-dynamic.component.spec.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/app/pages/page-products-dynamic/page-products-dynamic.component.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)