react-native-bpk-component-switch

4.0.1 • Public • Published

react-native-bpk-component-switch

Backpack React Native switch component.

Installation

npm install react-native-bpk-component-switch --save-dev

Usage

import React, { Component } from 'react';
import { View, StyleSheet, Text } from 'react-native';
import BpkSwitch from 'react-native-bpk-component-switch';
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}>
        <BpkSwitch />
        <BpkSwitch value />
      </View >
    );
  }
}

Props

Property PropType Required Default Value
value bool false false
theme See Theme Props below false null

Theme Props

  • switchPrimaryColor

Dependents (0)

Package Sidebar

Install

npm i react-native-bpk-component-switch

Weekly Downloads

2

Version

4.0.1

License

Apache-2.0

Unpacked Size

274 kB

Total Files

13

Last publish

Collaborators

  • anambl
  • skyscanner-koalasquad
  • gert-jan.vercauteren
  • frugoman
  • marianeumayer-skyscanner
  • ojcurt
  • shaundon