You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

genesis-component

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

genesis-component - npm Package Compare versions

Comparing version

to
0.0.2

84

dist/index.js
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = _interopDefault(require('react'));
var PropTypes = _interopDefault(require('prop-types'));
var classNames = _interopDefault(require('classnames'));
var styles = {"test":"_3ybTi"};
function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
var ExampleComponent = function ExampleComponent(_ref) {
var text = _ref.text;
return /*#__PURE__*/React.createElement("div", {
className: styles.test
}, "Example Component: ", text);
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
var styles = {"button":"_1kAgW","default":"_1WObo","disabled":"_1m3xz","none":"_v3adv","success":"_asSrV","warning":"_2i6Cp","danger":"_21wsy","primary":"_1CGtH","minimal":"_h7uNA"};
var Button = function Button(_ref) {
var _classNames;
var appearance = _ref.appearance,
children = _ref.children,
className = _ref.className,
disabled = _ref.disabled,
intent = _ref.intent,
onClick = _ref.onClick,
type = _ref.type,
props = _objectWithoutPropertiesLoose(_ref, ["appearance", "children", "className", "disabled", "intent", "onClick", "type"]);
var _onClick = function _onClick(e) {
!disabled && onClick(e);
};
var _className = classNames(styles.button, styles[appearance], styles[intent], (_classNames = {}, _classNames[styles.disabled] = disabled, _classNames), className);
return /*#__PURE__*/React.createElement("button", _extends({
className: _className,
type: type,
onClick: _onClick
}, props), children);
};
exports.ExampleComponent = ExampleComponent;
Button.propTypes = {
appearance: PropTypes.oneOf(['', 'default', 'primary', 'minimal']),
children: PropTypes.node,
className: PropTypes.string,
disabled: PropTypes.bool,
intent: PropTypes.oneOf(['', 'none', 'success', 'warning', 'danger']),
onClick: PropTypes.func,
type: PropTypes.string
};
Button.defaultProps = {
appearance: 'default',
disabled: false,
intent: 'none',
onClick: function onClick() {},
type: 'button'
};
exports.Button = Button;
//# sourceMappingURL=index.js.map
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
var styles = {"test":"_3ybTi"};
function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
var ExampleComponent = function ExampleComponent(_ref) {
var text = _ref.text;
return /*#__PURE__*/React.createElement("div", {
className: styles.test
}, "Example Component: ", text);
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
var styles = {"button":"_1kAgW","default":"_1WObo","disabled":"_1m3xz","none":"_v3adv","success":"_asSrV","warning":"_2i6Cp","danger":"_21wsy","primary":"_1CGtH","minimal":"_h7uNA"};
var Button = function Button(_ref) {
var _classNames;
var appearance = _ref.appearance,
children = _ref.children,
className = _ref.className,
disabled = _ref.disabled,
intent = _ref.intent,
onClick = _ref.onClick,
type = _ref.type,
props = _objectWithoutPropertiesLoose(_ref, ["appearance", "children", "className", "disabled", "intent", "onClick", "type"]);
var _onClick = function _onClick(e) {
!disabled && onClick(e);
};
var _className = classNames(styles.button, styles[appearance], styles[intent], (_classNames = {}, _classNames[styles.disabled] = disabled, _classNames), className);
return /*#__PURE__*/React.createElement("button", _extends({
className: _className,
type: type,
onClick: _onClick
}, props), children);
};
export { ExampleComponent };
Button.propTypes = {
appearance: PropTypes.oneOf(['', 'default', 'primary', 'minimal']),
children: PropTypes.node,
className: PropTypes.string,
disabled: PropTypes.bool,
intent: PropTypes.oneOf(['', 'none', 'success', 'warning', 'danger']),
onClick: PropTypes.func,
type: PropTypes.string
};
Button.defaultProps = {
appearance: 'default',
disabled: false,
intent: 'none',
onClick: function onClick() {},
type: 'button'
};
export { Button };
//# sourceMappingURL=index.modern.js.map

8

package.json
{
"name": "genesis-component",
"version": "0.0.1",
"version": "0.0.2",
"description": "components from phase 1 / genesis",

@@ -30,3 +30,2 @@ "author": "josuerojasrojas",

"classnames": "^2.2.6",
"node-sass": "^4.14.1",
"prop-types": "^15.7.2",

@@ -56,3 +55,2 @@ "react": "^16.0.0"

"microbundle-crl": "^0.13.10",
"node-sass": "^4.14.1",
"npm-run-all": "^4.1.5",

@@ -63,3 +61,5 @@ "prettier": "^2.0.4",

"react-dom": "^16.13.1",
"react-scripts": "^3.4.1"
"react-scripts": "^3.4.1",
"sass": "^1.26.5",
"sass-loader": "^8.0.2"
},

@@ -66,0 +66,0 @@ "files": [

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