🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-option-switch

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-option-switch - npm Package Compare versions

Comparing version

to
1.2.2

20

OptionSwitch.jsx

@@ -32,8 +32,3 @@ import React from 'react';

selectedItem: {
width: 125,
height: 24,
borderRadius: 12,
marginHorizontal: 16,
backgroundColor: '#FDE08C',
alignItems: 'center',

@@ -69,3 +64,5 @@ },

if (props.styles) {
this.styles = {...this.styles, ...props.styles};
for (const item in props.styles) {
Object.assign(this.styles[item], props.styles[item]);
}
}

@@ -102,5 +99,10 @@ }

<TouchableWithoutFeedback onPress={() => this.onChange(option)} key={option.key}>
<View style={option.key === this.state.selectedOption ? this.styles.selectedItem : this.styles.item}>
<Text style={this.styles.label}>{option.label}</Text>
</View>
<View style={[
this.styles.item,
this.props.styles?.item,
option.key === this.state.selectedOption && this.styles.selectedItem,
option.key === this.state.selectedOption && this.props.styles?.selectedItem,
]}>
<Text style={this.styles.label}>{option.label}</Text>
</View>
</TouchableWithoutFeedback>

@@ -107,0 +109,0 @@ );

{
"name": "react-native-option-switch",
"version": "1.2.1",
"version": "1.2.2",
"description": "Options switch component for React Native. It can be used as radio button or boolean switch. ",

@@ -5,0 +5,0 @@ "main": "index.js",