Skip to content

Commit 027aed0

Browse files
author
Kashish Grover
committed
fix(native): Fix text breaking TextInput, add TextInput story
1 parent 76dec0a commit 027aed0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Text/native/Text.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import React from 'react';
21
import PropTypes from 'prop-types';
32
import styled from 'styled-components';
4-
import { Platform, Text as ReactNativeText } from 'react-native';
3+
import { Platform } from 'react-native';
54
import { responsiveSizePx } from '../../utils/reactNativeResponsiveSize';
65
import theme from '../../theme/native';
76

@@ -14,7 +13,7 @@ const fontFamilies = {
1413
bold: 'Averta-Bold',
1514
};
1615

17-
const Text = styled((props) => <ReactNativeText {...props} />)`
16+
const Text = styled.Text`
1817
color: ${(props) => props.theme.color[props.color]};
1918
font-size: ${(props) => responsiveSizePx(props.theme.fontSize[props.size])};
2019
font-family: ${(props) => fontFamilies[props.weight]};

storybook/native/config.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ import { getStorybookUI, addDecorator, configure } from '@storybook/react-native
66
import { Font } from 'expo';
77
import theme from '../../src/theme/native';
88

9-
console.disableYellowBox = true;
10-
119
const loadStories = () => {
10+
require('../../src/TextInput/native/TextInput.story');
1211
require('../../src/Card/native/Card.story');
1312
require('../../src/Button/native/Button.story');
1413
require('../../src/Text/native/Text.story');
@@ -20,7 +19,7 @@ const StorybookUI = getStorybookUI();
2019

2120
addDecorator((story) => (
2221
<ThemeProvider theme={theme}>
23-
<ScrollView style={{ backgroundColor: '#eee' }}>
22+
<ScrollView style={{ backgroundColor: '#eee', padding: 16 }}>
2423
{story()}
2524
</ScrollView>
2625
</ThemeProvider>

0 commit comments

Comments
 (0)