JSPM

rn-button-component-helper

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q31283F
  • License MIT

Cross-platform button for React Native which supports keyword button component, custom button, etc

Package Exports

  • rn-button-component-helper

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rn-button-component-helper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

rn-button-component-helper

A cross-platform (iOS, Android) button for React Native.

Features:

  • Cross-platform (iOS, Android)
  • Default styling works well
  • Extensively customisable styling and rendering
  • Many button type variations: small round, normal round, big round, small box, normal box, big box, etc.

Installation

Use Npm to install package: npm install rn-button-component-helper

Use Yarn to install package: yarn add rn-button-component-helper

Props

  • activeOpacity: Determines what the opacity of the wrapped view should be when touch is active. Defaults to 0.2.
  • type: The variants of button. Default to normal round
  • text: Text of button. Default to none
  • onPress: Called when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock).
  • accessibilityLabel: Overrides the text that's read by the screen reader when the user interacts with the element.
  • buttonStyle: Styling for custom button (TouchableOpacityProps).
  • textStyle: Styling for custom text (StyleProp).

Basic Usage

import RNButton from 'rn-button-component-helper';

<RNButton
    onPress={onPress}
    type={type}
    text={text}
    />

Custom Usage

import RNButton from 'rn-button-component-helper';

<RNButton
    accessibilityLabel={accessibilityLabel}
    onPress={onPress}
    activeOpacity={activeOpacity}
    type={type}
    buttonStyle={{buttonStyle}}
    textStyle={{textStyle}}
    >

    {children}

</RNButton>

License

MIT