
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-bpk-component-button
Advanced tools
Backpack React Native button component.
npm install react-native-bpk-component-button --save-dev
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'React', :path => '../node_modules/react-native'
pod 'BVLinearGradient', :path => '../node_modules/react-native-bpk-component-button/node_modules/react-native-linear-gradient'
react-native-bpk-component-button depends on react-native-bpk-component-icon make sure to follow the installation guide for the icon component for the different platformsNote: This is necessary because react-native-bpk-component-button depends on react-native-linear-gradient.
import { StyleSheet, View } from 'react-native';
import React, { Component } from 'react';
import BpkButton, { BUTTON_TYPES, ICON_ALIGNMENTS } from 'react-native-bpk-component-button';
import { spacingBase } from 'bpk-tokens/tokens/base.react.native';
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
padding: spacingBase,
}
});
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<BpkButton
type={BUTTON_TYPES.primary}
title="Book flight"
onPress={() => {}}
/>
<BpkButton
type={BUTTON_TYPES.featured}
title="Book flight"
onPress={() => {}}
/>
<BpkButton
disabled
type={BUTTON_TYPES.destructive}
title="Book flight"
onPress={() => {}}
/>
<BpkButton
large
type={BUTTON_TYPES.primary}
title="Book flight"
onPress={() => {}}
/>
<BpkButton
type={BUTTON_TYPES.featured}
title="Book flight"
icon="baggage"
onPress={() => {}}
/>
<BpkButton
type={BUTTON_TYPES.primary}
title="Book flight"
icon="baggage"
iconAlignment={ICON_ALIGNMENTS.leading}
onPress={() => {}}
/>
<BpkButton
type={BUTTON_TYPES.featured}
title="Book flight"
icon="baggage"
iconOnly
onPress={() => {}}
/>
</View>
);
}
}
| Property | PropType | Required | Default Value |
|---|---|---|---|
| onPress | func | true | - |
| title | string | true | - |
| accessibilityLabel | string | false | props.title |
| disabled | bool | false | false |
| icon | oneOf(string, element) Strings must be a BpkIcon | false | null |
| iconAlignment | oneOf('leading', 'trailing') | false | trailing |
| iconOnly (iOS only) | bool | false | false |
| large (iOS only) | bool | false | false |
| theme | See Theme Props below | false | null |
| type | oneOf('primary', 'featured', 'secondary', 'destructive', 'outline') | false | null |
buttonPrimaryTextColorbuttonPrimaryGradientStartColorbuttonPrimaryGradientEndColorbuttonSecondaryTextColorbuttonSecondaryBackgroundColorbuttonSecondaryBorderColorbuttonFeaturedTextColorbuttonFeaturedGradientStartColorbuttonFeaturedGradientEndColorbuttonDestructiveTextColorbuttonDestructiveBackgroundColorbuttonDestructiveBorderColorFAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.