import { Meta, Story, Preview } from '@storybook/addon-docs/blocks';
import * as Stories from './examples';

<Meta title="Components|TouchableOpacity" />

# TouchableOpacity

A wrapper for making views respond properly to touches. On press down, the
opacity of the wrapped view is decreased, dimming it.

Opacity is controlled by wrapping the children in an Animated.View, which is
added to the view hierarchy. Be aware that this can affect layout.

## Props

| Name                      | Type      | Default |
| ------------------------- | --------- | ------- |
| ...TouchableWithoutFeedbackProps      | |
| activeOpacity             | ?number   | 0.2 |

### activeOpacity

Determines what the opacity of the wrapped view should be when active.

## Examples

<Preview withSource='none'>
  <Story name="disabled">
    <Stories.disabled />
  </Story>
</Preview>

<Preview withSource='none'>
  <Story name="delayEvents">
    <Stories.delayEvents />
  </Story>
</Preview>

<Preview withSource='none'>
  <Story name="feedbackEvents">
    <Stories.feedbackEvents />
  </Story>
</Preview>
