New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@canonical/react-components

Package Overview
Dependencies
Maintainers
10
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canonical/react-components - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

CHANGELOG.md

14

dist/components/Button/Button.js

@@ -36,6 +36,10 @@ "use strict";

"has-icon": hasIcon,
"is-disabled": Component === "a" & disabled,
"is-disabled": Component !== "button" & disabled,
"is-inline": inline
});
var onClickDisabled = function onClickDisabled(e) {
return e.preventDefault();
};
if (Component === "button") {

@@ -45,3 +49,5 @@ return _react.default.createElement("button", _extends({

disabled: disabled
}, props), children);
}, props, {
onClick: disabled ? onClickDisabled : undefined
}), children);
}

@@ -52,3 +58,5 @@

"aria-disabled": disabled
}, props), children);
}, props, {
onClick: disabled ? onClickDisabled : undefined
}), children);
};

@@ -55,0 +63,0 @@

@@ -21,2 +21,3 @@ "use strict";

expect(wrapper).toMatchSnapshot();
expect(wrapper.prop("onClick")).toBe(undefined);
});

@@ -39,2 +40,3 @@ it("correctly disables a button", function () {

expect(wrapper.prop("disabled")).toBe(undefined);
expect(wrapper.prop("onClick")).not.toBe(undefined);
});

@@ -41,0 +43,0 @@ it("correctly handle icons", function () {

{
"name": "@canonical/react-components",
"version": "0.1.0",
"version": "0.2.0",
"main": "dist/index.js",

@@ -19,3 +19,3 @@ "module": "dist/index.js",

},
"homepage": "https://github.com/canonical-web-and-design/react-components/",
"homepage": "/react-components/",
"devDependencies": {

@@ -38,3 +38,3 @@ "@babel/cli": "7.6.4",

},
"peerDependencies.": {
"peerDependencies": {
"react": "16.11.0",

@@ -45,3 +45,3 @@ "react-dom": "16.11.0"

"build": "rm -rf dist && NODE_ENV=production babel src --out-dir dist --copy-files --ignore .test.js,.md,__snapshots__,testing",
"build-docs": "build-storybook -c .storybook -o .out",
"build-docs": "build-storybook -c .storybook -o docs",
"clean": "rm -rf node_modules dist .out",

@@ -48,0 +48,0 @@ "docs": "start-storybook --port 8403",

This package provides [React](https://reactjs.org/) components for [Vanilla Framework](http://vanillaframework.io).
See the [component docs](https://canonical-web-and-design.github.io/react-components/) for usage instructions.
## Install

@@ -4,0 +6,0 @@

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