Files
react-native-web/docs/storybook/ui-explorer/AppText.js
Nicolas Gallagher 87ead7f64e Fix doc styles
2017-09-11 15:52:41 -07:00

31 lines
569 B
JavaScript

/* eslint-disable react/prop-types */
/**
* @flow
*/
import React from 'react';
import { StyleSheet, Text } from 'react-native';
const AppText = ({ style, ...rest }) => (
<Text
{...rest}
accessibilityRole={rest.href ? 'link' : undefined}
style={[styles.baseText, style, rest.href && styles.link]}
/>
);
export default AppText;
const styles = StyleSheet.create({
baseText: {
fontSize: '1rem',
lineHeight: '1.3125em'
},
link: {
color: '#1B95E0',
marginTop: 'calc(0.5 * 1.3125rem)',
textDecorationLine: 'underline'
}
});