generated from capcodigital/oss-template
-
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.
Merge pull request #162 from capcodigital/feature/add_storybook
added storybook and stories
- Loading branch information
Showing
8 changed files
with
25,021 additions
and
12,679 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,19 @@ | ||
/** @type { import('@storybook/react-webpack5').StorybookConfig } */ | ||
const config = { | ||
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/preset-create-react-app", | ||
"@storybook/addon-interactions", | ||
], | ||
framework: { | ||
name: "@storybook/react-webpack5", | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: "tag", | ||
}, | ||
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,14 @@ | ||
/** @type { import('@storybook/react').Preview } */ | ||
const preview = { | ||
parameters: { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
Large diffs are not rendered by default.
Oops, something went wrong.
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,25 @@ | ||
import ContentComponent from "../components/ContentComponent"; | ||
import "../components/ContentComponent/styles"; | ||
|
||
export default { | ||
title: "Content", | ||
component: ContentComponent, | ||
} | ||
var subtitle = "Test Subtitle" | ||
var content = "Test content" | ||
|
||
export const ColorWhiteWithButton = () => <ContentComponent | ||
subtitle={subtitle} content={content} | ||
/> | ||
|
||
export const ColorBlackWithButton = () => <ContentComponent | ||
subtitle={subtitle} content={content} color="black" | ||
/> | ||
|
||
export const ColorWhiteNoButton = () => <ContentComponent | ||
subtitle={subtitle} content={content} noBtn | ||
/> | ||
|
||
export const ColorBlackNoButton = () => <ContentComponent | ||
subtitle={subtitle} content={content} color="black" noBtn | ||
/> |
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 @@ | ||
import FooterComponent from "../components/FooterComponent"; | ||
import "../components/FooterComponent/styles"; | ||
|
||
export default { | ||
title: "Footer", | ||
component: FooterComponent, | ||
} | ||
|
||
export const Footer = () => <FooterComponent /> |
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 @@ | ||
import HeroComponent from "../components/HeroComponent"; | ||
import "../components/HeroComponent/styles"; | ||
|
||
export default { | ||
title: "Hero", | ||
component: HeroComponent, | ||
} | ||
|
||
export const Hero = () => <HeroComponent /> |
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 @@ | ||
import NavBarComp from "../components/NavBar"; | ||
import "../components/NavBar/styles"; | ||
|
||
export default { | ||
title: "NavBar", | ||
component: NavBarComp, | ||
} | ||
|
||
export const NavBar = () => <NavBarComp /> |