This repository has been archived by the owner on Apr 5, 2024. It is now read-only.
-
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
7,766 additions
and
212 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
"extends": ["next/core-web-vitals", "plugin:storybook/recommended"] | ||
} |
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,28 @@ | ||
const path = require("path"); | ||
|
||
module.exports = { | ||
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
], | ||
framework: "@storybook/react", | ||
webpackFinal: async (config, { configType }) => { | ||
config.module.rules.push({ | ||
test: /\.mjs$/, | ||
include: /node_modules/, | ||
type: "javascript/auto", | ||
}); | ||
config.resolve.alias = { | ||
...config.resolve.alias, | ||
"@components": path.resolve(__dirname, "../src/components"), | ||
"@config": path.resolve(__dirname, "../src/config"), | ||
"@utils": path.resolve(__dirname, "../src/utils"), | ||
"@hooks": path.resolve(__dirname, "../src/hooks"), | ||
"@modules": path.resolve(__dirname, "../src/modules"), | ||
"@lib": path.resolve(__dirname, "../src/lib"), | ||
}; | ||
return 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,9 @@ | ||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from "react"; | ||
import { ComponentStory, ComponentMeta } from "@storybook/react"; | ||
|
||
import Footer from "./"; | ||
import { | ||
footerBodySection, | ||
footerBottomSection, | ||
footerPartnerSection, | ||
footerTopSection, | ||
} from "@config"; | ||
|
||
export default { | ||
title: "Footer", | ||
component: Footer, | ||
} as ComponentMeta<typeof Footer>; | ||
|
||
const Template: ComponentStory<typeof Footer> = args => <Footer {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { | ||
bodySection: footerBodySection, | ||
bottomSection: footerBottomSection, | ||
partnerSection: footerPartnerSection, | ||
topSection: footerTopSection, | ||
}; | ||
|
||
export const TopSection = Template.bind({}); | ||
TopSection.args = { | ||
topSection: footerTopSection, | ||
}; | ||
|
||
export const BodySection = Template.bind({}); | ||
BodySection.args = { | ||
bodySection: footerBodySection, | ||
}; | ||
|
||
export const PartnerSection = Template.bind({}); | ||
PartnerSection.args = { | ||
partnerSection: footerPartnerSection, | ||
}; | ||
|
||
export const BottomSection = Template.bind({}); | ||
BottomSection.args = { | ||
bottomSection: footerBottomSection, | ||
}; |
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,28 @@ | ||
import React from "react"; | ||
import { ComponentStory, ComponentMeta } from "@storybook/react"; | ||
|
||
import Header from "./"; | ||
import { headerBody, headerNav } from "@config"; | ||
|
||
export default { | ||
title: "Header", | ||
component: Header, | ||
} as ComponentMeta<typeof Header>; | ||
|
||
const Template: ComponentStory<typeof Header> = args => <Header {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { | ||
bodySection: headerBody, | ||
navSection: headerNav, | ||
}; | ||
|
||
export const Body = Template.bind({}); | ||
Body.args = { | ||
bodySection: headerBody, | ||
}; | ||
|
||
export const Nav = Template.bind({}); | ||
Nav.args = { | ||
navSection: headerNav, | ||
}; |
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,31 @@ | ||
import React from "react"; | ||
import { ComponentStory, ComponentMeta } from "@storybook/react"; | ||
|
||
import Layout from "./"; | ||
import { | ||
headerBody, | ||
headerNav, | ||
footerBodySection, | ||
footerBottomSection, | ||
footerPartnerSection, | ||
footerTopSection, | ||
} from "@config"; | ||
|
||
export default { | ||
title: "Layout", | ||
component: Layout, | ||
} as ComponentMeta<typeof Layout>; | ||
|
||
const Template: ComponentStory<typeof Layout> = args => <Layout {...args} />; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { | ||
children: <p>Hello World</p>, | ||
headerProps: { bodySection: headerBody, navSection: headerNav }, | ||
footerProps: { | ||
bodySection: footerBodySection, | ||
bottomSection: footerBottomSection, | ||
partnerSection: footerPartnerSection, | ||
topSection: footerTopSection, | ||
}, | ||
}; |
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.