Skip to content

Commit

Permalink
fix: add new screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
sashtje committed Oct 8, 2023
1 parent 2e44a43 commit 1e73e07
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type { ComponentMeta, ComponentStory } from '@storybook/react';

import { StoreDecorator } from '@/shared/config/storybook/StoreDecorator/StoreDecorator';
import { UserRole } from '@/entities/User/testing';

import { ArticlePageGreeting } from './ArticlePageGreeting';

export default {
Expand All @@ -10,9 +13,28 @@ export default {
},
} as ComponentMeta<typeof ArticlePageGreeting>;

const Template: ComponentStory<typeof ArticlePageGreeting> = (args) => (
<ArticlePageGreeting {...args} />
);
const Template: ComponentStory<typeof ArticlePageGreeting> = () => <ArticlePageGreeting />;

export const Normal = Template.bind({});
Normal.args = {};
Normal.decorators = [
StoreDecorator({
user: {
authData: {
id: '1',
roles: [UserRole.ADMIN],
jsonSettings: { isArticlesPageWasOpened: false },
},
},
}),
];
Normal.parameters = {
mockData: [
{
url: `${__API__}/users/1`,
method: 'PATCH',
status: 200,
response: [],
},
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const Template: ComponentStory<typeof ArticlesPage> = (args) => <ArticlesPage {.

export const Normal = Template.bind({});
Normal.args = {};
Normal.decorators = [StoreDecorator({})];
Normal.decorators = [
StoreDecorator({ user: { authData: { jsonSettings: { isArticlesPageWasOpened: true } } } }),
];
Normal.parameters = {
mockData: [
{
Expand Down

0 comments on commit 1e73e07

Please sign in to comment.