verdnatura-chat/app/containers/TextInput.stories.js

32 lines
863 B
JavaScript

/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions, react/prop-types */
import React from 'react';
import { storiesOf } from '@storybook/react-native';
import { View, StyleSheet } from 'react-native';
import TextInput from './TextInput';
const styles = StyleSheet.create({
paddingHorizontal: {
paddingHorizontal: 14
}
});
const stories = storiesOf('Text Input', module);
const item = {
name: 'Rocket.Chat',
longText: 'https://open.rocket.chat/images/logo/android-chrome-512x512.png'
};
const theme = 'light';
stories.add('Short and Long Text', () => (
<>
<View style={styles.paddingHorizontal}>
<TextInput label='Short Text' placeholder='placeholder' value={item.name} theme={theme} />
<TextInput label='Long Text' placeholder='placeholder' value={item.longText} theme={theme} />
</View>
</>
));