-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
8625e85
commit 014bb23
Showing
16 changed files
with
899 additions
and
829 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: [ | ||
{ | ||
name: "@storybook/addon-essentials", | ||
options: { | ||
backgrounds: false, | ||
}, | ||
}, | ||
"@storybook/addon-links", | ||
"@storybook/addon-a11y", | ||
"themeprovider-storybook/register", | ||
], | ||
}; |
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 @@ | ||
<link href="https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;600&display=swap" rel="stylesheet"> |
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,33 @@ | ||
import React from "react"; | ||
import { withThemesProvider } from "themeprovider-storybook"; | ||
import light from "../src/theme/light"; | ||
import dark from "../src/theme/dark"; | ||
import ResetCSS from "../src/ResetCSS"; | ||
import { ModalProvider } from "../src/widgets/Modal"; | ||
|
||
const globalDecorator = (StoryFn) => ( | ||
<ModalProvider> | ||
<ResetCSS /> | ||
<StoryFn /> | ||
</ModalProvider> | ||
); | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
layout: "fullscreen", | ||
}; | ||
|
||
const themes = [ | ||
{ | ||
name: "Light", | ||
backgroundColor: light.colors.background, | ||
...light, | ||
}, | ||
{ | ||
name: "Dark", | ||
backgroundColor: dark.colors.background, | ||
...dark, | ||
}, | ||
]; | ||
|
||
export const decorators = [globalDecorator, withThemesProvider(themes)]; |
Oops, something went wrong.