-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix(38312): Update dependencies as indicated by Snyk #39372
Changes from all commits
e1251c6
86f0ce5
5129cea
a417d7c
eb7c2bb
ff61a71
510dead
0afe4eb
e13257f
64e701c
c013c72
7b9fa93
71b43c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
import type {StorybookConfig} from '@storybook/core-common'; | ||
import type {StorybookConfig} from '@storybook/types'; | ||
|
||
type Main = { | ||
managerHead: (head: string) => string; | ||
} & StorybookConfig; | ||
|
||
const main: Main = { | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', '@storybook/addon-react-native-web'], | ||
const main: StorybookConfig = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', '@storybook/addon-webpack5-compiler-babel'], | ||
staticDirs: ['./public', {from: '../assets/css', to: 'css'}, {from: '../assets/fonts/web', to: 'fonts'}], | ||
core: { | ||
builder: 'webpack5', | ||
}, | ||
managerHead: (head: string) => ` | ||
core: {}, | ||
|
||
managerHead: (head) => ` | ||
pecanoro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
${head} | ||
${process.env.ENV === 'staging' ? '<meta name="robots" content="noindex">' : ''} | ||
`, | ||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: false, | ||
}, | ||
}; | ||
|
||
export default main; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
<link rel="icon" type="image/png" href="logo.png" /> | ||
<link rel="stylesheet" type="text/css" href="css/fonts.css" /> | ||
<link rel="stylesheet" type="text/css" href="index.css" /> |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,5 +1,5 @@ | ||||||
import type {ThemeVars} from '@storybook/theming'; | ||||||
import {create} from '@storybook/theming'; | ||||||
import {create} from '@storybook/theming/create'; | ||||||
// eslint-disable-next-line @dword-design/import-alias/prefer-alias | ||||||
import colors from '../src/styles/theme/colors'; | ||||||
|
||||||
|
@@ -13,6 +13,7 @@ const theme: ThemeVars = create({ | |||||
colorPrimary: colors.productDark400, | ||||||
colorSecondary: colors.green, | ||||||
appContentBg: colors.productDark100, | ||||||
appPreviewBg: colors.productDark100, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I build production storybook via The empty preview page looks like below if this is removed But I agree with this style added, the preview looks prettier
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found that the dev cmd There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I found that there's an option to change the background color of the preview area. So, I'm inclined not to incorporate this style. Screen.Recording.2024-04-02.at.5.52.01.PM.movThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @allroundexperts Oh, yes, |
||||||
textColor: colors.productDark900, | ||||||
barTextColor: colors.productDark900, | ||||||
barSelectedColor: colors.green, | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import {useIsFocused as realUseIsFocused} from '@react-navigation/native'; | ||
import {useIsFocused as realUseIsFocused, useTheme as realUseTheme} from '@react-navigation/native'; | ||
|
||
// We only want this mocked for storybook, not jest | ||
// We only want these mocked for storybook, not jest | ||
const useIsFocused: typeof realUseIsFocused = process.env.NODE_ENV === 'test' ? realUseIsFocused : () => true; | ||
|
||
// @ts-expect-error as we're mocking this function | ||
const useTheme: typeof realUseTheme = process.env.NODE_ENV === 'test' ? realUseTheme : () => ({}); | ||
pecanoro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
export * from '@react-navigation/core'; | ||
export * from '@react-navigation/native'; | ||
export {useIsFocused}; | ||
export {useIsFocused, useTheme}; |
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.
Would you like to share your consideration to remove this addon
@storybook/addon-react-native-web
? Is it because there's no entry command inpackage.json
to run storybook on native platforms (no usage on native platforms) ?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.
That's correct. I wasn't able to find this being used anywhere.