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

eyzy

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eyzy - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

45

dist/eyzy.js
/*!
* Eyzy v0.0.6
* (c) 2019 amsik
* Eyzy v0.0.8
* (c) 2020 amsik
* Released under the MIT License.

@@ -297,5 +297,46 @@ */

var Switch = /** @class */ (function (_super) {
__extends(Switch, _super);
function Switch(props) {
var _this = _super.call(this, props) || this;
_this.handleClick = function () {
if (_this.props.onChange) {
_this.props.onChange(!_this.state.checked);
}
if (!('checked' in _this.props)) {
_this.setState({ checked: !_this.state.checked });
}
};
var checked = 'checked' in props
? props.checked
: props.defaultChecked;
_this.state = {
checked: checked || false
};
return _this;
}
Switch.getDerivedStateFromProps = function (props, state) {
if ('checked' in props) {
return __assign(__assign({}, state), { checked: props.checked });
}
return null;
};
Switch.prototype.render = function () {
var _a = this.props, size = _a.size, children = _a.children;
var classNames = cn('eyzy-switch', size && "eyzy-switch-" + size);
var button = React.createElement("button", { className: classNames, onClick: this.handleClick, "aria-checked": this.state.checked });
if (children) {
return (React.createElement("span", { className: "eyzy-switch-container" },
button,
React.createElement("span", { className: "eyzy-switch-text", onClick: this.handleClick }, children)));
}
return button;
};
return Switch;
}(React.PureComponent));
exports.Button = Button;
exports.Checkbox = Checkbox;
exports.Input = Input;
exports.Switch = Switch;
exports.Tabs = Tabs;

@@ -302,0 +343,0 @@ exports.Tag = Tag;

/*!
* Eyzy v0.0.6
* (c) 2019 amsik
* Eyzy v0.0.8
* (c) 2020 amsik
* Released under the MIT License.

@@ -291,3 +291,43 @@ */

export { Button, Checkbox, Input, Tabs, Tag };
var Switch = /** @class */ (function (_super) {
__extends(Switch, _super);
function Switch(props) {
var _this = _super.call(this, props) || this;
_this.handleClick = function () {
if (_this.props.onChange) {
_this.props.onChange(!_this.state.checked);
}
if (!('checked' in _this.props)) {
_this.setState({ checked: !_this.state.checked });
}
};
var checked = 'checked' in props
? props.checked
: props.defaultChecked;
_this.state = {
checked: checked || false
};
return _this;
}
Switch.getDerivedStateFromProps = function (props, state) {
if ('checked' in props) {
return __assign(__assign({}, state), { checked: props.checked });
}
return null;
};
Switch.prototype.render = function () {
var _a = this.props, size = _a.size, children = _a.children;
var classNames = cn('eyzy-switch', size && "eyzy-switch-" + size);
var button = React.createElement("button", { className: classNames, onClick: this.handleClick, "aria-checked": this.state.checked });
if (children) {
return (React.createElement("span", { className: "eyzy-switch-container" },
button,
React.createElement("span", { className: "eyzy-switch-text", onClick: this.handleClick }, children)));
}
return button;
};
return Switch;
}(React.PureComponent));
export { Button, Checkbox, Input, Switch, Tabs, Tag };
//# sourceMappingURL=eyzy.js.map

2

package.json
{
"name": "eyzy",
"version": "0.0.7",
"version": "0.0.8",
"author": "Kostiantyn",

@@ -5,0 +5,0 @@ "description": "React UI Toolkit",

Sorry, the diff of this file is not supported yet

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