-
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
1 parent
977cd6c
commit 732a8ec
Showing
14 changed files
with
3,451 additions
and
46 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 |
---|---|---|
|
@@ -4,4 +4,5 @@ public | |
.DS_Store | ||
static/data/ | ||
!static/data/.gitkeep | ||
src/styles/fonts.css | ||
src/styles/fonts.css | ||
*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,20 @@ | ||
|
||
@font-face { | ||
font-family: "Satoshi-Variable"; | ||
src: url("../static/fonts/Satoshi-Variable.woff2") format("woff2"), | ||
url("../static/fonts/Satoshi-Variable.woff") format("woff"), | ||
url("../static/fonts/Satoshi-Variable.ttf") format("truetype"); | ||
font-weight: 300 900; | ||
font-display: swap; | ||
font-style: normal; | ||
} | ||
|
||
@font-face { | ||
font-family: "Satoshi-VariableItalic"; | ||
src: url("../static/fonts/Satoshi-VariableItalic.woff2") format("woff2"), | ||
url("../static/fonts/Satoshi-VariableItalic.woff") format("woff"), | ||
url("../static/fonts/Satoshi-VariableItalic.ttf") format("truetype"); | ||
font-weight: 300 900; | ||
font-display: swap; | ||
font-style: italic; | ||
} |
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 type { StorybookConfig } from "@storybook/react-webpack5" | ||
|
||
const config: StorybookConfig = { | ||
stories: ["../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-webpack5-compiler-swc", | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@chromatic-com/storybook", | ||
"@storybook/addon-interactions", | ||
], | ||
framework: { | ||
name: "@storybook/react-webpack5", | ||
options: {}, | ||
}, | ||
staticDirs: ["../static"], | ||
core: { | ||
builder: "webpack5", | ||
}, | ||
webpackFinal: async (config) => { | ||
// Transpile Gatsby module because Gatsby includes un-transpiled ES6 code. | ||
config.module.rules[0].exclude = [ | ||
/node_modules\/(?!(gatsby|gatsby-script)\/)/, | ||
] | ||
// Remove core-js to prevent issues with Storybook | ||
config.module.rules[0].exclude = [/core-js/] | ||
// Use babel-plugin-remove-graphql-queries to remove static queries from components when rendering in storybook | ||
// config.module.rules[0].use[0].options.plugins.push( | ||
// require.resolve("babel-plugin-remove-graphql-queries"), | ||
// ) | ||
config.resolve.mainFields = ["browser", "module", "main"] | ||
return config | ||
}, | ||
} | ||
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,7 @@ | ||
<link | ||
rel="preload" | ||
href="/fonts/Satoshi-Variable.woff2" | ||
as="font" | ||
type="font/woff2" | ||
crossorigin="anonymous" | ||
/> |
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,18 @@ | ||
import type { Preview } from "@storybook/react" | ||
|
||
import "./fonts.css" | ||
import "bootstrap/dist/css/bootstrap.min.css" | ||
import "../src/styles/style.css" | ||
|
||
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
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
File renamed without changes.
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 @@ | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
import { fn } from "@storybook/test" | ||
import Token from "../../components/Token" | ||
|
||
const meta: Meta<typeof Token> = { | ||
component: Token, | ||
} | ||
|
||
export default meta | ||
type Story = StoryObj<typeof Token> | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
} |
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 @@ | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
import { fn } from "@storybook/test" | ||
import UserArea from "../../components/UserArea" | ||
|
||
const meta: Meta<typeof UserArea> = { | ||
component: UserArea, | ||
} | ||
|
||
export default meta | ||
type Story = StoryObj<typeof UserArea> | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
} |
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 type { Meta, StoryObj } from "@storybook/react" | ||
import { fn } from "@storybook/test" | ||
import UserCard from "../../components/UserCard" | ||
import type { User } from "../../components/UserCard" | ||
|
||
const meta: Meta<typeof UserCard> = { | ||
component: UserCard, | ||
} | ||
|
||
export default meta | ||
type Story = StoryObj<typeof UserCard> | ||
|
||
export const Default: Story = { | ||
args: { | ||
user: { | ||
username: "user", | ||
isStaff: false, | ||
profile: { | ||
pattern: ["#000000", "#FFFFFF"], | ||
}, | ||
} as User, | ||
}, | ||
} |
Oops, something went wrong.