-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
61 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Binary file modified
BIN
+17 Bytes
(100%)
.loki/reference/chrome_iphone7_pages_NotFoundPage_Dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-633 Bytes
(94%)
.loki/reference/chrome_iphone7_shared_ThemeSwitcher_Dark.png
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.
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.
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.
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.
Binary file modified
BIN
-199 Bytes
(98%)
.loki/reference/chrome_laptop_shared_ThemeSwitcher_Dark.png
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
src/shared/config/storybook/ThemeDecorator/ThemeDecorator.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import { Story } from '@storybook/react'; | ||
import { Theme } from 'app/providers/ThemeProvider'; | ||
import { Theme, ThemeProvider } from 'app/providers/ThemeProvider'; | ||
|
||
export const ThemeDecorator = (theme: Theme) => (StoryComponent: Story) => ( | ||
<div className={`app ${theme}`}> | ||
<StoryComponent /> | ||
</div> | ||
<ThemeProvider initialTheme={theme}> | ||
<div className={`app ${theme}`}> | ||
<StoryComponent /> | ||
</div> | ||
</ThemeProvider> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import { ComponentMeta, ComponentStory } from '@storybook/react'; | ||
import { Modal } from 'shared/ui/Modal/Modal'; | ||
import { ThemeDecorator } from 'shared/config/storybook/ThemeDecorator/ThemeDecorator'; | ||
import { Theme } from 'app/providers/ThemeProvider'; | ||
|
||
export default { | ||
title: 'shared/Modal', | ||
component: Modal, | ||
argTypes: { | ||
backgroundColor: { control: 'color' }, | ||
}, | ||
} as ComponentMeta<typeof Modal>; | ||
|
||
const Template: ComponentStory<typeof Modal> = (args) => <Modal {...args} />; | ||
|
||
export const Primary = Template.bind({}); | ||
Primary.args = { | ||
children: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. A ab\n' | ||
+ ' accusantium aliquid architecto autem consequuntur debitis et facere,\n' | ||
+ ' laudantium modi nostrum nulla obcaecati odit quas quod sapiente,\n' | ||
+ ' veritatis? Illo, veritatis.', | ||
isOpen: true, | ||
}; | ||
|
||
export const Dark = Template.bind({}); | ||
Dark.args = { | ||
children: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. A ab\n' | ||
+ ' accusantium aliquid architecto autem consequuntur debitis et facere,\n' | ||
+ ' laudantium modi nostrum nulla obcaecati odit quas quod sapiente,\n' | ||
+ ' veritatis? Illo, veritatis.', | ||
isOpen: true, | ||
}; | ||
|
||
Dark.decorators = [ThemeDecorator(Theme.DARK)]; |