Skip to content

Commit

Permalink
bump storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrepreneur committed Jun 16, 2023
1 parent 3a4370c commit e6fa019
Show file tree
Hide file tree
Showing 6 changed files with 1,358 additions and 624 deletions.
30 changes: 16 additions & 14 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const config: StorybookConfig = {
storyStoreV7: true,
},
webpackFinal: async (config) => {
config.module.rules.push(
config.module?.rules?.push(
{
test: /\.(ts|tsx)$/,
use: [
Expand All @@ -49,22 +49,24 @@ const config: StorybookConfig = {
}
);

// config.resolve.extensions.push('.eot', '.otf', '.tff', '.woff', '.woff2');
config.resolve.extensions.push('.ts', '.tsx');
if (config.resolve) {
// config.resolve.extensions.push('.eot', '.otf', '.tff', '.woff', '.woff2');
config.resolve.extensions?.push('.ts', '.tsx');

config.resolve.plugins = [
...(config.resolve.plugins || []),
new TsconfigPathsPlugin({
extensions: config.resolve.extensions,
}),
];
config.resolve.plugins = [
...(config.resolve.plugins || []),
new TsconfigPathsPlugin({
extensions: config.resolve?.extensions,
}),
];

// include ts files here so they can be resolved properly
// config.resolve.modules.push(process.cwd() + '/node_modules');
// config.resolve.modules.push(process.cwd() + '/src');
// include ts files here so they can be resolved properly
// config.resolve.modules.push(process.cwd() + '/node_modules');
// config.resolve.modules.push(process.cwd() + '/src');

// this is needed for working w/ linked folders
config.resolve.symlinks = false;
// this is needed for working w/ linked folders
config.resolve.symlinks = false;
}

// return result
return config;
Expand Down
2 changes: 1 addition & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
import { themes } from '@storybook/theming';
// import { themes } from '@storybook/theming';
import theme from '../src/theme/index';
import { Fonts, Box } from '../src';

Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
"@babel/core": "^7.15.0",
"@chakra-ui/storybook-addon": "^4.0.16",
"@size-limit/preset-small-lib": "^5.0.3",
"@storybook/addon-docs": "7.0.0-beta.46",
"@storybook/addon-essentials": "7.0.0-beta.46",
"@storybook/addon-links": "7.0.0-beta.46",
"@storybook/addon-viewport": "7.0.0-beta.46",
"@storybook/addons": "7.0.0-beta.46",
"@storybook/react-webpack5": "^7.0.0-beta.46",
"@storybook/addon-docs": "^7.0.21",
"@storybook/addon-essentials": "^7.0.21",
"@storybook/addon-links": "^7.0.21",
"@storybook/addon-viewport": "^7.0.21",
"@storybook/addons": "^7.0.21",
"@storybook/react-webpack5": "^7.0.21",
"@svgr/core": "^5.5.0",
"@svgr/plugin-jsx": "^5.5.0",
"@svgr/plugin-prettier": "^5.5.0",
Expand All @@ -81,7 +81,7 @@
"prettier": "^2.5.1",
"react-is": "^17.0.2",
"size-limit": "^5.0.3",
"storybook": "^7.0.0-beta.46",
"storybook": "^7.0.21",
"ts-loader": "^9.4.1",
"tsdx": "^0.14.1",
"tslib": "^2.3.1",
Expand All @@ -93,8 +93,8 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@rollup/plugin-replace": "^3.0.0",
"@storybook/react": "^7.0.0-beta.46",
"@storybook/theming": "^7.0.0-beta.46",
"@storybook/react": "^7.0.21",
"@storybook/theming": "^7.0.21",
"@types/react-datepicker": "^4.8.0",
"chakra-react-select": "^4.6.0",
"framer-motion": "^10.12.16",
Expand Down
7 changes: 2 additions & 5 deletions src/components/atoms/DatePicker/CustomDatePickerButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Button,
ChakraButtonProps,
forwardRef,
ComponentWithAs,
// ComponentWithAs,
} from '../../chakra';

export type CustomDatePickerButtonProps = ChakraButtonProps & {
Expand All @@ -12,10 +12,7 @@ export type CustomDatePickerButtonProps = ChakraButtonProps & {
ref?: HTMLInputElement;
};

export type CustomDatePickerButton = ComponentWithAs<
'button',
CustomDatePickerButtonProps
> & {
export type CustomDatePickerButton = CustomDatePickerButtonProps & {
Button: typeof Button;
};

Expand Down
4 changes: 2 additions & 2 deletions src/components/chakra/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export {
CircularProgressLabel,
CloseButton,
Collapse,
CollapseOptions,
// CollapseOptions,
ColorModeScript,
ComponentWithAs,
// ComponentWithAs,
Container,
CSSReset,
Divider,
Expand Down
Loading

0 comments on commit e6fa019

Please sign in to comment.