diff --git a/app/react-native/src/preview/components/StoryView/index.tsx b/app/react-native/src/preview/components/StoryView/index.tsx index b7407527aab..3318b568773 100644 --- a/app/react-native/src/preview/components/StoryView/index.tsx +++ b/app/react-native/src/preview/components/StoryView/index.tsx @@ -1,8 +1,8 @@ import React, { Component } from 'react'; import { View, Text } from 'react-native'; +import styled from '@emotion/native'; import addons from '@storybook/addons'; import Events from '@storybook/core-events'; -import style from './style'; interface Props { listenToEvents: boolean; @@ -16,6 +16,14 @@ interface State { selection?: any; } +const HelpContainer = styled.View` + flex: 1; + padding-horizontal: 15; + padding-vertical: 15; + align-items: center; + justify-content: center; +`; + export default class StoryView extends Component { componentDidMount() { if (this.props.listenToEvents) { @@ -46,7 +54,7 @@ export default class StoryView extends Component { renderHelp = () => { const { url } = this.props; return ( - + {url && url.length ? ( Please open the Storybook UI ({url}) with a web browser and select a story for preview. @@ -56,14 +64,14 @@ export default class StoryView extends Component { Please open the Storybook UI with a web browser and select a story for preview. )} - + ); }; renderOnDeviceUIHelp = () => ( - + Please open navigator and select a story to preview. - + ); render() { @@ -84,7 +92,7 @@ export default class StoryView extends Component { const { kind, story } = selection; return storyFn ? ( - + {storyFn()} ) : ( @@ -97,7 +105,7 @@ export default class StoryView extends Component { const { kind, story } = selection; return storyFn ? ( - + {storyFn()} ) : ( diff --git a/app/react-native/src/preview/components/StoryView/style.ts b/app/react-native/src/preview/components/StoryView/style.ts deleted file mode 100644 index 71bf4b25971..00000000000 --- a/app/react-native/src/preview/components/StoryView/style.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { StyleSheet } from 'react-native'; -export default StyleSheet.create({ - main: { - flex: 1, - }, - help: { - flex: 1, - padding: 15, - alignItems: 'center', - justifyContent: 'center', - }, -});