diff --git a/.storybook/preview.js b/.storybook/preview.js index 7ccfd74e0e45..b198c0d2d626 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -7,15 +7,23 @@ import ComposeProviders from '../src/components/ComposeProviders'; import HTMLEngineProvider from '../src/components/HTMLEngineProvider'; import OnyxProvider from '../src/components/OnyxProvider'; import {LocaleContextProvider} from '../src/components/withLocalize'; +import {KeyboardStateProvider} from '../src/components/withKeyboardState'; +import {EnvironmentProvider} from '../src/components/withEnvironment'; +import {WindowDimensionsProvider} from '../src/components/withWindowDimensions'; import ONYXKEYS from '../src/ONYXKEYS'; Onyx.init({ keys: ONYXKEYS, + initialKeyStates: { + [ONYXKEYS.NETWORK]: {isOffline: false}, + }, }); const decorators = [ (Story) => ( - + ), diff --git a/src/components/MagicCodeInput.js b/src/components/MagicCodeInput.js index 5dba1c9c1b20..be6f74aa5d72 100644 --- a/src/components/MagicCodeInput.js +++ b/src/components/MagicCodeInput.js @@ -51,7 +51,7 @@ const propTypes = { }; const defaultProps = { - value: undefined, + value: '', name: '', autoFocus: true, errorText: '', diff --git a/src/stories/Checkbox.stories.js b/src/stories/Checkbox.stories.js index 7148281f2a7e..4a7de2c29753 100644 --- a/src/stories/Checkbox.stories.js +++ b/src/stories/Checkbox.stories.js @@ -22,6 +22,7 @@ const Default = Template.bind({}); Default.args = { onPress: () => {}, isChecked: true, + accessibilityLabel: '', }; export {Default}; diff --git a/src/stories/Composer.stories.js b/src/stories/Composer.stories.js index 3dfc5b0e3ead..50039d7d537a 100644 --- a/src/stories/Composer.stories.js +++ b/src/stories/Composer.stories.js @@ -8,6 +8,9 @@ import styles from '../styles/styles'; import themeColors from '../styles/themes/default'; import * as StyleUtils from '../styles/StyleUtils'; import CONST from '../CONST'; +import withNavigationFallback from '../components/withNavigationFallback'; + +const ComposerWithNavigation = withNavigationFallback(Composer); /** * We use the Component Story Format for writing stories. Follow the docs here: @@ -16,7 +19,7 @@ import CONST from '../CONST'; */ const story = { title: 'Components/Composer', - component: Composer, + component: ComposerWithNavigation, }; const parser = new ExpensiMark(); @@ -29,7 +32,7 @@ function Default(args) { return ( - ; + const [value, setValue] = useState(''); + return ( + + ); } // Arguments can be passed to the component by binding