1.0.3 • Published 7 years ago
rn-button-component-helper v1.0.3
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 roundtext: Text of button. Default to noneonPress: 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>