-
Notifications
You must be signed in to change notification settings - Fork 3
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
9 changed files
with
5,513 additions
and
1,885 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 |
---|---|---|
|
@@ -35,3 +35,5 @@ yarn-error.log* | |
next-env.d.ts | ||
|
||
!/apps/hestia/public/datafeeds/udf/dist/ | ||
|
||
*storybook.log |
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,32 @@ | ||
import type { StorybookConfig } from "@storybook/nextjs"; | ||
|
||
import { join, dirname } from "path"; | ||
|
||
/** | ||
* This function is used to resolve the absolute path of a package. | ||
* It is needed in projects that use Yarn PnP or are set up within a monorepo. | ||
*/ | ||
function getAbsolutePath(value: string): any { | ||
return dirname(require.resolve(join(value, "package.json"))); | ||
} | ||
const config: StorybookConfig = { | ||
stories: [ | ||
"../src/components/**/*.stories.@(js|jsx|mjs|ts|tsx)", | ||
"../src/components/**/**/*.stories.@(js|jsx|mjs|ts|tsx)", | ||
"../src/app/*.stories.@(js|jsx|mjs|ts|tsx)", | ||
"../src/app/**/*.stories.@(js|jsx|mjs|ts|tsx)" | ||
], | ||
addons: [ | ||
getAbsolutePath("@storybook/addon-onboarding"), | ||
getAbsolutePath("@storybook/addon-links"), | ||
getAbsolutePath("@storybook/addon-essentials"), | ||
getAbsolutePath("@chromatic-com/storybook"), | ||
getAbsolutePath("@storybook/addon-interactions") | ||
], | ||
framework: { | ||
name: getAbsolutePath("@storybook/nextjs"), | ||
options: {}, | ||
}, | ||
staticDirs: ["../public"], | ||
}; | ||
export default config; |
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,3 @@ | ||
import { addons } from '@storybook/manager-api'; | ||
import theme from "./theme" | ||
addons.setConfig({ theme }); |
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 type { Preview } from "@storybook/react"; | ||
import "@polkadex/ux/dist/index.css"; | ||
import "../src/styles/globals.scss"; | ||
import { Roboto } from "next/font/google"; | ||
import * as React from "react"; | ||
|
||
const font = Roboto({ | ||
weight: ["100", "300", "400", "500", "700", "900"], | ||
subsets: ["latin"] | ||
}); | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i | ||
} | ||
} | ||
}, | ||
decorators: [ | ||
(Story) => { | ||
return ( | ||
<div className={font.className}> | ||
<Story /> | ||
</div> | ||
); | ||
} | ||
] | ||
}; | ||
|
||
export default preview; |
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,23 @@ | ||
import { create } from '@storybook/theming/create'; | ||
//@ts-ignore | ||
import brandImage from "../public/logo.svg" | ||
|
||
export default create({ | ||
base: 'dark', | ||
colorPrimary: '#8B909A', | ||
colorSecondary: '#E6007A', | ||
appBg: '#06070A', | ||
appPreviewBg: '#06070A', | ||
appContentBg: '#131419', | ||
appBorderRadius: 4, | ||
barTextColor: '#fff', | ||
barSelectedColor: '#fff', | ||
barBg: '#1F2229', | ||
inputBg: '#2E303C', | ||
inputTextColor: '#fff', | ||
inputBorderRadius: 4, | ||
|
||
brandTitle:'Polkadex Orderbook', | ||
brandImage, | ||
brandUrl:'https://orderbook.polkadex.trade/', | ||
}) |
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
Oops, something went wrong.