Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuke-switch

Package Overview
Dependencies
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-switch - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

src/.DS_Store

4

HISTORY.md
# Changelog
## 2.0.1 / 2018-03-28
* [[39b37f7](http://gitlab.alibaba-inc.com/nuke/switch/commit/39b37f7c88a8c294d3f631677f5c855e7d3388c1)] - `fix` update type logic,update statements
## 2.0.0 / 2018-03-23

@@ -5,0 +9,0 @@

92

lib/styles/variable.js
'use strict';
/**
* @namespace component
* @property name switch
* @property prefix switch-
* @property group Switch
*/
function VariableMix(theme) {
var Core = theme.Core;
/**
* 开关
* @namespace component
* @property name switch
* @property tag Switch
* @property category component
*/
var ComponentCustomStyle = theme.Switch;

@@ -17,3 +16,3 @@

* width-iOS
* @property size/bounding
* @property namespace size/bounding
*/

@@ -23,3 +22,3 @@ var wrapWidthIOS = 100;

* width-android
* @property size/bounding
* @property namespace size/bounding
*/

@@ -30,3 +29,3 @@ var wrapWidthAndroid = 68;

* height-iOS
* @property size/bounding
* @property namespace size/bounding
*/

@@ -36,3 +35,3 @@ var wrapHeightIOS = 60;

* height-andorid
* @property size/bounding
* @property namespace size/bounding
*/

@@ -42,3 +41,3 @@ var wrapHeightAndroid = 28;

* margin
* @property size/bounding
* @property namespace size/bounding
*/

@@ -48,3 +47,3 @@ var wrapMargin = 0;

* padding
* @property size/bounding
* @property namespace size/bounding
*/

@@ -54,3 +53,3 @@ var wrapPadding = 0;

* corner
* @property statement/normal
* @property namespace statement/normal
*/

@@ -61,3 +60,3 @@ var wrapBorderRadius = 40;

* width-iOS
* @property size/border
* @property namespace size/border
*/

@@ -67,3 +66,3 @@ var wrapBorderWidthIOS = 2;

* width-andorid
* @property size/border
* @property namespace size/border
*/

@@ -74,3 +73,3 @@ var wrapBorderWidthAndroid = 0;

* background-iOS
* @property statement/checked
* @property namespace statement/checked
*/

@@ -80,3 +79,3 @@ var checkedBgColorIOS = '#00e158';

* background-android
* @property statement/checked
* @property namespace statement/checked
*/

@@ -87,3 +86,3 @@ var checkedBgColorAndroid = '#4FCEDB';

* background-iOS
* @property statement/unChecked
* @property namespace statement/unChecked
*/

@@ -93,3 +92,3 @@ var uncheckedBgColorIOS = Core['color-white'];

* background-android
* @property statement/unChecked
* @property namespace statement/unChecked
*/

@@ -100,3 +99,3 @@ var uncheckedBgColorAndroid = '#B1B1B1';

* border-iOS
* @property statement/checked
* @property namespace statement/checked
*/

@@ -106,3 +105,3 @@ var checkedBorderColorIOS = '#00e158';

* border-android
* @property statement/checked
* @property namespace statement/checked
*/

@@ -112,3 +111,3 @@ var checkedBorderColorAndroid = 'transparent';

* border
* @property statement/unChecked
* @property namespace statement/unChecked
*/

@@ -119,3 +118,3 @@ var uncheckedBorderColor = '#dfdfdf';

* boxShadowColor-iOS
* @property statement/checked
* @property namespace statement/checked
*/

@@ -125,3 +124,3 @@ var checkedbBoxshadowColorIOS = '#00e158';

* boxShadowColor-android
* @property statement/checked
* @property namespace statement/checked
*/

@@ -131,3 +130,3 @@ var checkedbBoxshadowColorAndroid = '#4FCEDB';

* boxShadowColor
* @property statement/unChecked
* @property namespace statement/unChecked
*/

@@ -138,3 +137,3 @@ var uncheckedBoxshadowColor = '#dfdfdf';

* border-iOS
* @property statement/checked-disabled
* @property namespace statement/checked-disabled
*/

@@ -144,3 +143,3 @@ var disabledCheckedBorderColorIOS = '#dfdfdf';

* border-android
* @property statement/checked-disabled
* @property namespace statement/checked-disabled
*/

@@ -151,3 +150,3 @@ var disabledCheckedBorderColorAndroid = '#1A9CB7';

* background-iOS
* @property statement/checked-disabled
* @property namespace statement/checked-disabled
*/

@@ -157,3 +156,3 @@ var disabledCheckedBgColorIOS = 'rgba(0,225,88,0.5)';

* background-android
* @property statement/checked-disabled
* @property namespace statement/checked-disabled
*/

@@ -163,3 +162,3 @@ var disabledCheckedBgColorAndorid = 'rgba(34,31,31,0.26)';

* background-iOS
* @property statement/unChecked-disabled
* @property namespace statement/unChecked-disabled
*/

@@ -169,3 +168,3 @@ var disabledUnCheckedBgColorIOS = '#cccccc';

* background-android
* @property statement/unChecked-disabled
* @property namespace statement/unChecked-disabled
*/

@@ -176,3 +175,3 @@ var disabledUnCheckedBgColorAndroid = 'rgba(34,31,31,0.26)';

* size-iOS
* @property size/dot
* @property namespace size/dot
*/

@@ -182,3 +181,3 @@ var dotSizeIOS = 60;

* size-android
* @property size/dot
* @property namespace size/dot
*/

@@ -188,3 +187,3 @@ var dotSizeAndroid = 44;

* top-iOS
* @property size/dot
* @property namespace size/dot
*/

@@ -197,3 +196,3 @@ var dotTopIOS = 0;

* background-iOS
* @property size/dot
* @property namespace size/dot
*/

@@ -203,3 +202,3 @@ var dotBgColorIOS = Core['color-white'];

* background-android
* @property size/dot
* @property namespace size/dot
*/

@@ -209,3 +208,3 @@ var dotBgColorAndroid = '#EBEBEB';

* background-iOS
* @property size/dot-checked
* @property namespace size/dot-checked
*/

@@ -215,3 +214,3 @@ var dotCheckedBgColorIOS = Core['color-white'];

* background-android
* @property size/dot-checked
* @property namespace size/dot-checked
*/

@@ -222,3 +221,3 @@ var dotCheckedBgColorAndroid = '#009EB7';

* background-iOS
* @property size/dot-disabled
* @property namespace size/dot-disabled
*/

@@ -228,3 +227,3 @@ var dotDisabledBgColorIOS = Core['color-white'];

* background-android
* @property size/dot-disabled
* @property namespace size/dot-disabled
*/

@@ -235,3 +234,3 @@ var dotDisabledBgColorAndroid = 'rgba(255,255,255,0.5)';

* left-iOS
* @property size/dot
* @property namespace size/dot
*/

@@ -241,3 +240,3 @@ var dotLeftIOS = 0;

* left-android
* @property size/dot
* @property namespace size/dot
*/

@@ -247,3 +246,3 @@ var dotLeftAndroid = -14;

* transform-iOS
* @property statement/dot
* @property namespace statement/dot
*/

@@ -253,3 +252,3 @@ var dotTransformIOS = 40;

* transform-android
* @property statement/dot
* @property namespace statement/dot
*/

@@ -301,5 +300,4 @@ var dotTransformAndroid = 48;

var variable = Object.assign(switchVaribles, ComponentCustomStyle);
console.log(variable);
return variable;
}
module.exports = VariableMix;

@@ -80,4 +80,8 @@ 'use strict';

}
var styles = themeStyle;
var isIOS = _nukeEnv.appInfo.platform.toLowerCase() === 'ios' || type === 'iOS';
var isIOS = _nukeEnv.appInfo.platform.toLowerCase() === 'ios';
if (type) {
isIOS = type === 'iOS';
}
var wrapStyle = Object.assign({}, styles.wrap, value ? styles.checkedWrap : styles.uncheckedWrap, disabled ? styles.disabledWrap : {}, disabled ? styles['disabled' + (value ? 'Checked' : 'UnChecked') + 'Wrap'] : {}, style);

@@ -84,0 +88,0 @@ if (isIOS) {

{
"name": "nuke-switch",
"version": "2.0.0",
"version": "2.0.1",
"description": "开关",

@@ -8,2 +8,3 @@ "main": "lib/index",

"lib",
"src",
"docs",

@@ -66,3 +67,4 @@ "theme",

"registry": "http://registry.npmjs.org"
}
},
"license": "Apache"
}

@@ -24,4 +24,4 @@ import { createElement, Component, render } from 'rax';

switch2: false,
switch3: null,
switch4: null,
switch3: true,
switch4: false,
};

@@ -43,6 +43,7 @@ }

<DemoContainer>
<DemoSection title="type">
<DemoSection title="iOS">
<Demo>
<DemoItem direction="column">
<Switch
type="iOS"
style={styles.item}

@@ -55,2 +56,3 @@ key="switch1"

<Switch
type="iOS"
style={styles.item}

@@ -64,2 +66,23 @@ key="switch2"

</DemoSection>
<DemoSection title="iOS">
<Demo>
<DemoItem direction="column">
<Switch
type="android"
style={styles.item}
key="switch1"
checked={this.state.switch3}
onValueChange={this.change.bind(this, 'switch3')}
/>
<Switch
type="android"
style={styles.item}
key="switch2"
checked={this.state.switch4}
onValueChange={this.change.bind(this, 'switch4')}
/>
</DemoItem>
</Demo>
</DemoSection>
</DemoContainer>

@@ -66,0 +89,0 @@ </StyleProvider>

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc