Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 18 migration #895

Merged
merged 27 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
19a5493
Migrate stories of Badge, Button, Checkbox and FormField to addon-con…
xuesichao Jun 20, 2022
c6aa319
Migrate from themeprovider-storybook to @storybook/addon-styling
xuesichao Apr 4, 2023
387edf4
Deprecate SFC
xuesichao Apr 4, 2023
7642ce5
List children prop explicitly in type definition
xuesichao Apr 4, 2023
8acaa75
Run linter to fix format issue
xuesichao Apr 4, 2023
803ef94
Fix type error in PopOver
xuesichao Apr 4, 2023
e18dd4d
Migrate integration test demo to react 18
xuesichao Apr 4, 2023
9f9bee2
Migrate to storybook v7
xuesichao Apr 6, 2023
2d97b87
Rename *.stories.mdx files to *.mdx
xuesichao Apr 6, 2023
97cd49b
Migrate stories for SDK Components
xuesichao Apr 6, 2023
7341793
Migrate stories for Providers and Hooks
xuesichao Apr 6, 2023
638b0d4
Export components from their declaration statement to be able to popu…
xuesichao Apr 6, 2023
72a3421
Migrate stories of Badge, Button, Checkbox and FormField to storybook…
xuesichao Apr 7, 2023
e60b43e
Migrate Radio UI Component
xuesichao Apr 7, 2023
50f61ef
Upgrade styled-components to latest version
xuesichao Apr 12, 2023
3dff0dc
Migrate stories for icons
xuesichao May 8, 2023
e44ccf0
Upgrade Flex component story
devalevenkatesh May 9, 2023
d9b8feb
Fix flex stack story
devalevenkatesh May 9, 2023
9ea793d
Migrate stories for several components
xuesichao May 11, 2023
e2ecb8f
Migrate stories for more components
xuesichao May 11, 2023
dcb710d
Migrate more stories for components
xuesichao May 11, 2023
8f1a867
Migrate stories for reset components
xuesichao May 12, 2023
4b47af3
Add copyright and changelog
xuesichao May 12, 2023
e9545ff
Add react 18 support in peerDependencies
xuesichao May 17, 2023
9c9a4e5
Fix broken links in the storybook
simmkyu May 24, 2023
ab3c5de
Fix unit tests
simmkyu May 26, 2023
dc0d384
Re-generate package-lock.json to mitigate "... when your package.json…
simmkyu May 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .storybook/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ module.exports = {
reactDocgen: 'react-docgen-typescript',
reactDocgenTypescriptOptions: {
shouldExtractLiteralValuesFromEnum: true,
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
propFilter: (prop) =>
prop.parent ? !/node_modules/.test(prop.parent.fileName) : true,
},
},
stories: ['../src/**/*.stories.@(ts|js|tsx|mdx)'],
stories: ['../src/**/ui/FormField/*.stories.@(ts|js|tsx|mdx)'],
addons: [
'@storybook/addon-knobs',
'@storybook/addon-controls',
'@storybook/addon-storysource',
'@storybook/addon-viewport',
'themeprovider-storybook',
'@storybook/addon-styling',
'@storybook/addon-a11y',
{
name: '@storybook/addon-docs',
Expand All @@ -29,4 +30,5 @@ module.exports = {
},
},
],
framework: '@storybook/react',
};
34 changes: 18 additions & 16 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import React from 'react';
import { createGlobalStyle } from 'styled-components';
import { withKnobs } from '@storybook/addon-knobs';
import { withThemesProvider } from 'themeprovider-storybook';
import { createGlobalStyle, ThemeProvider } from 'styled-components';
import { withThemeFromJSXProvider } from '@storybook/addon-styling';

import { GlobalStyles } from '../src/theme/GlobalStyles';
import lightTheme from '../src/theme/light';
import darkTheme from '../src/theme/dark';

const themes = [lightTheme, darkTheme];

const StorybookStyle = createGlobalStyle`
#root {
height: 100vh;
Expand All @@ -19,16 +16,21 @@ const StorybookStyle = createGlobalStyle`
}
`;

const withGlobalStyles = (Story: any) => (
<>
<GlobalStyles />
<StorybookStyle />
<Story />
</>
);

export const decorators = [
withGlobalStyles,
withThemesProvider(themes),
withKnobs
withThemeFromJSXProvider({
themes: {
light: lightTheme,
dark: darkTheme,
},
defaultTheme: 'light',
Provider: ThemeProvider,
GlobalStyles: GlobalStyles,
}),
];

export const argTypes = {
tag: { table: { disable: true } },
id: { table: { disable: true } },
className: { table: { disable: true } },
css: { table: { disable: true } },
};
Loading