From cafe10d85107d980220956e6444357621532f419 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Mon, 19 Feb 2018 18:28:18 -0800 Subject: [PATCH] Improve View 'pointerEvents' example --- .../View/examples/PropPointerEvents.js | 52 +++++++++++++------ 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/website/storybook/1-components/View/examples/PropPointerEvents.js b/website/storybook/1-components/View/examples/PropPointerEvents.js index 095e237e..3eb81e76 100644 --- a/website/storybook/1-components/View/examples/PropPointerEvents.js +++ b/website/storybook/1-components/View/examples/PropPointerEvents.js @@ -1,28 +1,46 @@ -/** - * @flow - */ +/* eslint-disable react/prop-types */ +/* @flow */ import { logger } from '../helpers'; import React from 'react'; -import { Text, TouchableHighlight, View } from 'react-native'; +import { StyleSheet, Text, TouchableHighlight, View } from 'react-native'; + +const Box = ({ pointerEvents }) => ( + + + {pointerEvents} + + +); const ViewStyleExample = () => ( - - - none - - - auto - - - box-only - - - box-none - + + + + + ); +const styles = StyleSheet.create({ + box: { + backgroundColor: '#ececec', + padding: 30, + marginVertical: 5 + }, + content: { + backgroundColor: 'white', + padding: 10, + borderWidth: 1, + borderColor: 'black', + borderStyle: 'solid' + } +}); export default ViewStyleExample;