-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add storybook and animated planet component
- Loading branch information
Showing
22 changed files
with
15,321 additions
and
5,486 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ build | |
LICENSE | ||
package.json | ||
package-lock.json | ||
storybook-static | ||
build | ||
tmp |
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,72 @@ | ||
import * as path from "path"; | ||
import { fileURLToPath } from "url"; | ||
import type { StorybookConfig } from "@storybook/react-webpack5"; | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-webpack5-compiler-swc", | ||
"@storybook/addon-onboarding", | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@chromatic-com/storybook", | ||
"@storybook/addon-interactions", | ||
], | ||
framework: { | ||
name: "@storybook/react-webpack5", | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: "tag", | ||
}, | ||
swc: () => ({ | ||
jsc: { | ||
transform: { | ||
react: { | ||
runtime: "automatic", | ||
}, | ||
}, | ||
}, | ||
}), | ||
webpackFinal: config => { | ||
return { | ||
...config, | ||
resolve: { | ||
...config.resolve, | ||
alias: { | ||
...config.resolve?.alias, | ||
"@site": path.resolve(fileURLToPath(import.meta.url), "../.."), | ||
}, | ||
}, | ||
module: { | ||
...config.module, | ||
rules: [ | ||
...(config.module?.rules as Record<string, any>[]), | ||
{ | ||
test: /\.(sa|sc|c)ss$/, // Test for .sass, .scss and .css files | ||
use: [ | ||
// MiniCssExtractPlugin.loader, // Extract css into separate files | ||
"style-loader", | ||
"css-loader", // Translates CSS into CommonJS | ||
{ | ||
loader: "postcss-loader", // Loader for webpack to process CSS with PostCSS | ||
options: { | ||
postcssOptions: { | ||
ident: "postcss", | ||
plugins: [ | ||
require("postcss-import"), | ||
require("tailwindcss"), // use tailwindcss | ||
require("autoprefixer"), // add vendor prefixes | ||
], | ||
}, | ||
}, | ||
}, | ||
"sass-loader", // Compiles Sass to CSS | ||
], | ||
}, | ||
], | ||
}, | ||
}; | ||
}, | ||
}; | ||
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,16 @@ | ||
import type { Preview } from "@storybook/react"; | ||
|
||
import "../src/scss/custom.scss"; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
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
Oops, something went wrong.