Socket
Socket
Sign inDemoInstall

@amalto/switch

Package Overview
Dependencies
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amalto/switch - npm Package Compare versions

Comparing version 1.10.17 to 1.10.18

6

build/index.js

@@ -58,8 +58,8 @@ "use strict";

React.createElement("div", { className: (0, classnames_1.default)('onoffswitch', {
'left-align': this.props.alignLeft
'left-align': this.props.alignLeft,
}) },
React.createElement("input", { type: "checkbox", className: 'onoffswitch-checkbox', id: this.props.id, checked: this.props.value, onChange: !this.props.disabled ? this.handleChange : function () { }, name: this.props.name || this.props.id }),
React.createElement("input", { type: "checkbox", className: "onoffswitch-checkbox", id: this.props.id, checked: this.props.value, onChange: !this.props.disabled ? this.handleChange : function () { }, name: this.props.name || this.props.id }),
React.createElement("label", { className: "onoffswitch-label", htmlFor: this.props.id },
React.createElement("span", { className: (0, classnames_1.default)('onoffswitch-inner', {
'disabled': this.props.disabled
disabled: this.props.disabled,
}) }),

@@ -66,0 +66,0 @@ React.createElement("span", { className: "onoffswitch-switch" })))));

### Usage
```typescript
import Switch from '@amalto/switch'
import Switch from '@amalto/switch';
```

@@ -10,9 +10,12 @@

<Switch id='test-switch-id'
name='test-switch-name'
value={state.value}
changeHandler={( value, name ) => { setState({ value }) }}
alignLeft={false}
cssClass=''
/>
```
<Switch
id="test-switch-id"
name="test-switch-name"
value={state.value}
changeHandler={(value, name) => {
setState({ value });
}}
alignLeft={false}
cssClass=""
/>;
```
{
"name": "@amalto/switch",
"displayName": "Switch",
"description": "Switch button.",
"version": "1.10.17",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/amalto/platform6-ui-components"
},
"keywords": [
"user-interface",
"react",
"typescript"
"name": "@amalto/switch",
"displayName": "Switch",
"description": "Switch button.",
"version": "1.10.18",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/amalto/platform6-ui-components"
},
"keywords": [
"user-interface",
"react",
"typescript"
],
"main": "./build/index.js",
"typings": "./build/index.d.ts",
"author": "Amalto Technologies",
"scripts": {
"setup": "npm install",
"build": "rm -rf ./build/; tsc",
"test": "nyc ava ./test/test.js --verbose"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"classnames": "^2.2.6",
"react": "15.6.2",
"react-dom": "15.6.2"
},
"devDependencies": {
"@ava/babel-preset-stage-4": "2.0.0",
"@ava/babel-preset-transform-test-files": "^4.0.1",
"@babel/core": "^7.2.2",
"@babel/plugin-syntax-jsx": "^7.2.0",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.0.0",
"@types/bootstrap": "3.3.36",
"@types/classnames": "^2.2.3",
"@types/jquery": "^3.3.31",
"@types/react": "15.6.10",
"@types/react-dom": "15.5.6",
"ava": "1.2.1",
"babel-preset-react": "6.24.1",
"enzyme": "3.8.0",
"enzyme-adapter-react-15": "1.3.0",
"nyc": "^15.1.0",
"react-addons-test-utils": "15.6.2",
"react-test-renderer": "15.6.2",
"sinon": "4.5.0",
"ts-loader": "8.4.0",
"typescript": "4.7.4",
"webpack": "4.41.2"
},
"ava": {
"concurrency": 5,
"failFast": true,
"failWithoutAssertions": false,
"powerAssert": true,
"require": [
"@babel/register"
],
"main": "./build/index.js",
"typings": "./build/index.d.ts",
"author": "Amalto Technologies",
"scripts": {
"setup": "npm install",
"build": "rm -rf ./build/; tsc",
"test": "nyc ava ./test/test.js --verbose"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"classnames": "^2.2.6",
"react": "15.6.2",
"react-dom": "15.6.2"
},
"devDependencies": {
"@ava/babel-preset-stage-4": "2.0.0",
"@ava/babel-preset-transform-test-files": "^4.0.1",
"@babel/core": "^7.2.2",
"@babel/plugin-syntax-jsx": "^7.2.0",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.0.0",
"@types/bootstrap": "3.3.36",
"@types/classnames": "^2.2.3",
"@types/jquery": "^3.3.31",
"@types/react": "15.6.10",
"@types/react-dom": "15.5.6",
"ava": "1.2.1",
"babel-preset-react": "6.24.1",
"enzyme": "3.8.0",
"enzyme-adapter-react-15": "1.3.0",
"nyc": "^15.1.0",
"react-addons-test-utils": "15.6.2",
"react-test-renderer": "15.6.2",
"sinon": "4.5.0",
"ts-loader": "8.4.0",
"typescript": "4.7.4",
"webpack": "4.41.2"
},
"ava": {
"concurrency": 5,
"failFast": true,
"failWithoutAssertions": false,
"powerAssert": true,
"require": [
"@babel/register"
"babel": {
"extensions": [
"js",
"jsx"
],
"testOptions": {
"plugins": [
"@babel/plugin-syntax-jsx"
],
"babel": {
"extensions": [
"js",
"jsx"
],
"testOptions": {
"plugins": [
"@babel/plugin-syntax-jsx"
],
"presets": [
"@ava/babel-preset-stage-4",
"@babel/preset-react"
]
}
}
},
"gitHead": "bcde0e0743a37bc4509fc97c93b7b42f212ae402"
"presets": [
"@ava/babel-preset-stage-4",
"@babel/preset-react"
]
}
}
},
"gitHead": "801edce8493e39ebe12b6e14e26eac8c1b910d12"
}

@@ -6,5 +6,7 @@ # Switch

## Install
To install the Switch component run:
```terminal
npm install --save @amalto/switch
```
```
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext",
"es5",
"es6",
"es7",
"es2015",
"es2016",
"es2017",
"es2018"
],
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"module": "commonjs",
"moduleResolution": "node",
"jsx": "react",
"outDir": "./build",
"noImplicitAny": false,
"noUnusedParameters": true,
"removeComments": true,
"sourceMap": true,
"declaration": true,
"experimentalDecorators": true
},
"exclude": [
"node_modules"
]
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext",
"es5",
"es6",
"es7",
"es2015",
"es2016",
"es2017",
"es2018"
],
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"module": "commonjs",
"moduleResolution": "node",
"jsx": "react",
"outDir": "./build",
"noImplicitAny": false,
"noUnusedParameters": true,
"removeComments": true,
"sourceMap": true,
"declaration": true,
"experimentalDecorators": true
},
"exclude": ["node_modules"]
}
const { resolve } = require('path');
module.exports = {
entry: [
// the entry points of our app
'./index.tsx'
],
entry: [
// the entry points of our app
'./index.tsx',
],
output: {
// the output bundle
filename: 'index.js',
path: resolve(__dirname, './build'),
// necessary for HMR to know where to load the hot update chunks
publicPath: '/build/'
},
output: {
// the output bundle
filename: 'index.js',
path: resolve(__dirname, './build'),
// necessary for HMR to know where to load the hot update chunks
publicPath: '/build/',
},
resolve: {
extensions: ['.webpack.js', '.scss', '.css', '.js', '.ts', '.tsx']
},
node: {
fs: 'empty'
},
resolve: {
extensions: ['.webpack.js', '.scss', '.css', '.js', '.ts', '.tsx'],
},
node: {
fs: 'empty',
},
externals: {
'jquery': 'jQuery',
'pikaday': 'Pikaday',
'moment': 'moment'
},
externals: {
jquery: 'jQuery',
pikaday: 'Pikaday',
moment: 'moment',
},
module: {
rules: [
{
test: /\.ts(x)?$/,
loader: 'ts-loader',
exclude: /node_modules/
},
{
test: /\.js$/,
exclude: [/node_modules/, /test/]
}
]
},
devtool: 'source-map'
};
module: {
rules: [
{
test: /\.ts(x)?$/,
loader: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.js$/,
exclude: [/node_modules/, /test/],
},
],
},
devtool: 'source-map',
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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