-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(storybook): re-implements storybook
- Loading branch information
Showing
21 changed files
with
4,864 additions
and
414 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import type { StorybookConfig } from '@storybook/nextjs'; | ||
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@storybook/addon-interactions', | ||
'@storybook/addon-a11y', | ||
{ | ||
name: '@storybook/addon-styling', | ||
options: { | ||
postCss: true, | ||
}, | ||
}, | ||
'@bbbtech/storybook-formik/register', | ||
], | ||
framework: { | ||
name: '@storybook/nextjs', | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: 'tag', | ||
}, | ||
webpackFinal: async (config) => { | ||
config.resolve!.plugins = [ | ||
...(config.resolve!.plugins || []), | ||
new TsconfigPathsPlugin({ | ||
extensions: config.resolve!.extensions, | ||
}), | ||
]; | ||
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,31 @@ | ||
import '../src/styles/globals.css'; | ||
|
||
import { withThemeByDataAttribute } from '@storybook/addon-styling'; | ||
import type { Preview } from '@storybook/react'; | ||
import type { ReactNode } from 'react'; | ||
import React from 'react'; | ||
|
||
export const decorators = [ | ||
withThemeByDataAttribute({ | ||
themes: { | ||
light: 'light', | ||
dark: 'dark', | ||
}, | ||
defaultTheme: 'light', | ||
attributeName: 'class', | ||
}), | ||
]; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
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.
f8f2fa9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
portfolio – ./
portfolio-git-main-jakeherp.vercel.app
portfolio-jakeherp.vercel.app
jacobherper.com
www.jacobherper.com