From 0d0c7e6e27a272e20e94573bc9ee05f3d3d52d7a Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Fri, 16 Feb 2018 18:53:33 -0800 Subject: [PATCH] Document 'onBlur', 'onFocus', and 'onContextMenu' props --- packages/react-native-web/src/exports/Text/TextPropTypes.js | 3 +++ packages/react-native-web/src/exports/View/ViewPropTypes.js | 6 ++++++ website/storybook/1-components/Text/TextScreen.js | 4 ++++ website/storybook/1-components/View/ViewScreen.js | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/packages/react-native-web/src/exports/Text/TextPropTypes.js b/packages/react-native-web/src/exports/Text/TextPropTypes.js index 83f5fdd3..232bf978 100644 --- a/packages/react-native-web/src/exports/Text/TextPropTypes.js +++ b/packages/react-native-web/src/exports/Text/TextPropTypes.js @@ -24,6 +24,9 @@ const TextPropTypes = { children: any, importantForAccessibility: oneOf(['auto', 'no', 'no-hide-descendants', 'yes']), numberOfLines: number, + onBlur: func, + onContextMenu: func, + onFocus: func, onLayout: func, onPress: func, selectable: bool, diff --git a/packages/react-native-web/src/exports/View/ViewPropTypes.js b/packages/react-native-web/src/exports/View/ViewPropTypes.js index fe290c60..8bd2fc68 100644 --- a/packages/react-native-web/src/exports/View/ViewPropTypes.js +++ b/packages/react-native-web/src/exports/View/ViewPropTypes.js @@ -40,8 +40,11 @@ export type ViewProps = { children?: any, hitSlop?: EdgeInsetsProp, importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants', + onBlur?: Function, onClick?: Function, onClickCapture?: Function, + onContextMenu?: Function, + onFocus?: Function, onLayout?: (event: ViewLayoutEvent) => void, onResponderGrant?: Function, onResponderMove?: Function, @@ -85,8 +88,11 @@ const ViewPropTypes = { children: any, hitSlop: EdgeInsetsPropType, importantForAccessibility: oneOf(['auto', 'no', 'no-hide-descendants', 'yes']), + onBlur: func, onClick: func, onClickCapture: func, + onContextMenu: func, + onFocus: func, onLayout: func, onMoveShouldSetResponder: func, onMoveShouldSetResponderCapture: func, diff --git a/website/storybook/1-components/Text/TextScreen.js b/website/storybook/1-components/Text/TextScreen.js index 1a32f2f1..b9947085 100644 --- a/website/storybook/1-components/Text/TextScreen.js +++ b/website/storybook/1-components/Text/TextScreen.js @@ -125,6 +125,10 @@ const TextScreen = () => ( }} /> + + + + ( ]} /> + + + +