diff --git a/docs/storybook/1-components/View/ViewScreen.js b/docs/storybook/1-components/View/ViewScreen.js index 5d9d8bf9..890e63f3 100644 --- a/docs/storybook/1-components/View/ViewScreen.js +++ b/docs/storybook/1-components/View/ViewScreen.js @@ -87,45 +87,80 @@ const ViewScreen = () => + This defines how far a touch event can start away from the view (in pixels). Typical + interface guidelines recommend touch targets that are at least 30 - 40 + points/density-independent pixels. + , + + For example, if a touchable view has a height of 20 the touchable height + can be extended to 40 with hitSlop. + + ]} example={{ - code: '', - render: () => null + code: '' }} /> + A value of no will remove the element from the tab flow. + , + + A value of no-hide-descendants will hide the element and its children from + assistive technologies. (This is implemented using 'aria-hidden'.) + + ]} /> + Invoked on mount and layout changes with{' '} + {'{ nativeEvent: { layout: { x, y, width, height } } }'}, where{' '} + x and y are the offsets from the parent node. + + } /> + Does this view want to "claim" touch responsiveness? This is called for every touch move + on the View when it is not the responder. + + } /> + If a parent View wants to prevent a child View from becoming + responder on a move, it should have this handler return true. + + } /> + The View is now responding to touch events. This is the time to highlight + and show the user what is happening. For most touch interactions, you'll simply want to + wrap your component in TouchableHighlight or TouchableOpacity. + + } /> + Another responder is already active and will not release it to the View{' '} + asking to be the responder. + + } /> + The responder has been taken from the View. + + } /> + Some other View wants to become responder and is asking this{' '} + View to release its responder. Returning true allows its + release. + + } /> + If a parent View wants to prevent a child View from becoming + the responder on a touch start, it should have this handler return true. + + } /> + Controls whether the View can be the target of touch events. The enhanced{' '} + pointerEvents modes provided are not part of the CSS spec, therefore,{' '} + pointerEvents is excluded from style. + box-none preserves pointer events on the element's children;{' '} + box-only disables pointer events on the element's children. + + } example={{ render: () => }} @@ -188,21 +251,29 @@ const ViewScreen = () => + (For compatibility with React Native. Equivalent to accessibilityRole.) + + } /> + (For compatibility with React Native. Equivalent to accessibilityRole.) + + } /> diff --git a/docs/storybook/ui-explorer/DocItem.js b/docs/storybook/ui-explorer/DocItem.js index c8b6dd2f..f5ac0eaa 100644 --- a/docs/storybook/ui-explorer/DocItem.js +++ b/docs/storybook/ui-explorer/DocItem.js @@ -19,11 +19,7 @@ const DocItem = ({ description, example = {}, name, typeInfo, label }) => } {description && - {Array.isArray(description) - ? insertBetween(() => , description) - : - {description} - } + {insertBetween(() => , React.Children.toArray(description))} } {(example.render || example.code) &&