forked from Ivasoft/mattermost-mobile
*Summary* - This PR adds storybook into the mobile repo, and adds a sample story for the existing "loading" component. - In the root of the repo run `npm run storybook`. This step automatically scans and loads all stories. A new browser tab will open with the storybook interface. You can configure the storybook host url by updating the .env file in the root of the repo. This might be required if you're using a real device. When running in an emulator, the code tries to use the default network values. - Then run the usual `npm run android` (or `npm run ios`) and `npm run start` commands - Storybook has been integrated into the react-native-dev-menu. When the app is running in the emulator press CTRL+M or CMD+M to open the dev menu and select "Storybook". If running on a real device, shaking the device will bring up the react-native dev menu. You can also press d in the terminal where you ran npm run start to get the app running. - The storybook interface will open in the mobile app. The stories can be controlled either through the desktop browser storybook UI or the mobile browser storybook UI. Both will render the component on the device. *Ticket Link* https://mattermost.atlassian.net/browse/MM-28845 *Device Information* This PR was tested on: Iphone 11 emulator running ios 13.7 Pixel 3XL emulator running Android 10
9 lines
307 B
TypeScript
9 lines
307 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
// So that typescript doesn't complain about importing `@env` through react-native-dotenv
|
|
declare module '@env' {
|
|
export const STORYBOOK_HOST: string;
|
|
export const STORYBOOK_PORT: number;
|
|
}
|