Socket
Socket
Sign inDemoInstall

switch-react-native

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    switch-react-native

Switch in react native


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
8.75 kB
Created
Weekly downloads
 

Readme

Source

Switch React Native

Content

  • Switch React Native

Installation

npm install switch-react-native

Usage example

import React, { Component } from 'react';
import { View } from 'react-native';
import { Switch } from 'switch-react-native';

class SwitchExample extends Component {
  render() {
    return (
      <View>
        <Switch
          height={40}
          width={300}
          activeText={`Active Text`}
          inActiveText={`InActive Text`}
          onValueChange={(value: any) => console.log(value)}
        />
      </View>
    );
  }
}

Properties

  • width (Number) - Initial switch state (default: 150),
  • height (Number) - Initial switch state (default: 50),
  • time (Number) - Initial switch state (default: 200 mms),
  • value (Bool) - Initial switch state (default: false),
  • activeText (String) - String activeText,
  • inActiveText (String) - String inActiveText,
  • activeTextStyle (Object) - Style is object,
  • inActiveTextStyle (Object) - Style is object,
  • activeStyle (Object) - Style is object,
  • backgroundStyle (Object) - Style is object,

Events

  • onValueChange: This function is called when the switch is activated.

License

MIT License

Questions?

Feel free to create an issue

Keywords

FAQs

Last updated on 15 Mar 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc