UNPKG

@storybook/addon-ondevice-controls

Version:

Display storybook controls on your device.

16 lines (15 loc) 1.05 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { styled } from '@storybook/react-native-theming'; import { Linking, View } from 'react-native'; const Paragraph = styled.Text(({ theme }) => ({ marginBottom: 16, color: theme.color.defaultText, })); const LinkText = styled.Text(({ theme }) => ({ color: theme.color.secondary, textDecorationLine: 'underline', })); const NoControlsWarning = () => { return (_jsxs(View, { style: { padding: 10 }, children: [_jsx(Paragraph, { children: "This story is not configured to handle controls." }), _jsxs(Paragraph, { children: [_jsx(LinkText, { onPress: () => Linking.openURL('https://storybook.js.org/docs/react/essentials/controls'), children: "Learn how to add controls" }), ' ', "and see", ' ', _jsx(LinkText, { onPress: () => Linking.openURL('https://github.com/storybookjs/react-native/tree/next-6.0/examples/expo-example/components/ControlExamples'), children: "examples in the Storybook React Native repository." })] })] })); }; export default NoControlsWarning;