-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix-state-bleeding-in-js' of https://github.com/sherlo-…
…io/sherlo into fix-state-bleeding-in-js
- Loading branch information
Showing
6 changed files
with
23 additions
and
35 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 |
---|---|---|
@@ -1,12 +1,8 @@ | ||
export { default as addStorybookToDevMenu } from './addStorybookToDevMenu'; | ||
export { default as getStorybook } from './getStorybook'; | ||
export { default as isRunningStorybook } from './isRunningStorybook'; | ||
export { default as isRunningVisualTests } from './isRunningVisualTests'; | ||
export { default as isStorybookMode } from './isStorybookMode'; | ||
export { default as openStorybook } from './openStorybook'; | ||
export { default as shouldShowStorybook } from './shouldShowStorybook'; | ||
export { default as verifyIntegration } from './verifyIntegration'; | ||
|
||
export * from './types'; | ||
|
||
import addToggleStorybookToDevMenu from './addToggleStorybookToDevMenu'; | ||
|
||
addToggleStorybookToDevMenu(); |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { NativeModules } from 'react-native'; | ||
|
||
const { SherloModule } = NativeModules; | ||
|
||
/** | ||
* isStorybookMode determines whether Storybook should be displayed. | ||
* | ||
* Returns true if any of the following conditions are met: | ||
* 1. User selected "Toggle Storybook" in Dev Menu | ||
* 2. User called "openStorybook" function imported from "@sherlo/react-native-storybook" | ||
* 3. Build is running tests on Sherlo | ||
*/ | ||
const isStorybookMode = ['storybook', 'testing', 'verification'].includes( | ||
SherloModule?.getConstants().mode | ||
); | ||
|
||
export default isStorybookMode; |
16 changes: 0 additions & 16 deletions
16
packages/react-native-storybook/src/shouldShowStorybook.ts
This file was deleted.
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