npm.io
3.0.1 • Published 6 years ago

react-native-bpk-component-touchable-native-feedback

Licence
Apache-2.0
Version
3.0.1
Deps
1
Size
30 kB
Vulns
0
Weekly
0
Stars
543

react-native-bpk-component-touchable-native-feedback

Backpack React Native touchable native feedback component.

Installation

npm install react-native-bpk-component-touchable-native-feedback --save-dev

Usage

import React, { Component } from 'react';
import { View, StyleSheet } from 'react-native';
import BpkText from 'react-native-bpk-component-text';
import { spacingBase } from 'bpk-tokens/tokens/base.react.native';
import BpkTouchableNativeFeedback from 'react-native-bpk-component-touchable-native-feedback';

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    padding: spacingBase,
  }
});

export default class App extends Component {
  render() {
    return (
      <View style={styles.container}>
        <BpkTouchableNativeFeedback
          onPress={() => null}
          accessibilityLabel="Example touchable native feedback"
        >
          <BpkText>
            Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean
            commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus
            et magnis dis parturient montes, nascetur ridiculus mus.
          </BpkText>
        </BpkTouchableNativeFeedback>
      </View>
    );
  }
}

Props

Property PropType Required Default Value
children element true -
borderlessBackground bool false true
color string false null