From a9e61b4cd554b45a72085ec115794475a368c1fb Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Thu, 28 Sep 2017 14:48:46 -0700 Subject: [PATCH] Docs: allow AppText to inherit font-size --- docs/storybook/ui-explorer/AppText.js | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/docs/storybook/ui-explorer/AppText.js b/docs/storybook/ui-explorer/AppText.js index 74db8275..c158f8b4 100644 --- a/docs/storybook/ui-explorer/AppText.js +++ b/docs/storybook/ui-explorer/AppText.js @@ -4,16 +4,27 @@ * @flow */ +import { bool } from 'prop-types'; import React from 'react'; import { StyleSheet, Text } from 'react-native'; -const AppText = ({ style, ...rest }) => ( - -); +class AppText extends React.PureComponent { + static contextTypes = { + isInAParentText: bool + }; + + render() { + const { style, ...rest } = this.props; + const isInAParentText = this.context; + return ( + + ); + } +} export default AppText;