Comparing version 0.2.7 to 0.2.8
@@ -6,3 +6,3 @@ "use strict"; | ||
var icon_1 = require("../icon"); | ||
var styles = require('../../src/styles/components/modal.scss'); | ||
var styles = require('../../../src/styles/components/modal.scss'); | ||
var IconMessageModal = (function (_super) { | ||
@@ -9,0 +9,0 @@ tslib_1.__extends(IconMessageModal, _super); |
@@ -5,3 +5,3 @@ "use strict"; | ||
var React = require("react"); | ||
var styles = require('../../src/styles/components/modal.scss'); | ||
var styles = require('../../../src/styles/components/modal.scss'); | ||
var MessageModal = (function (_super) { | ||
@@ -8,0 +8,0 @@ tslib_1.__extends(MessageModal, _super); |
@@ -10,3 +10,3 @@ "use strict"; | ||
var _1 = require("."); | ||
var styles = require('../../src/styles/components/modal.scss'); | ||
var styles = require('../../../src/styles/components/modal.scss'); | ||
var MODAL_COMPONENTS = {}; | ||
@@ -24,4 +24,5 @@ exports.registerModalComponent = function (id, component) { | ||
_this.handleContainerClick = function (e) { | ||
var isActive = _this.props.state.modalProps.backgroundActive === undefined | ||
|| _this.props.state.modalProps.backgroundActive; | ||
var modalProps = _this.props.state.modalProps; | ||
var isActive = !modalProps || modalProps.backgroundActive === undefined | ||
|| modalProps.backgroundActive; | ||
if (isActive) { | ||
@@ -47,3 +48,3 @@ e.stopPropagation(); | ||
var state = this.props.state; | ||
var props = state.modalProps; | ||
var modalProps = state.modalProps || {}; | ||
if (!state || state.modalType === '') | ||
@@ -54,6 +55,6 @@ return null; | ||
return null; | ||
var buttons = (props.buttons) ? props.buttons : []; | ||
var buttons = (modalProps.buttons) ? modalProps.buttons : []; | ||
var buttonsNode = (buttons.length > 0) ? React.createElement("div", { className: styles.modalButtons }, buttons.map(function (button) { return _this.renderButton(button); })) | ||
: null; | ||
var closeButtonNode = (props.closeButton) ? | ||
var closeButtonNode = (modalProps.closeButton) ? | ||
React.createElement("a", { className: styles.close, onClick: this.props.closeModal }, | ||
@@ -60,0 +61,0 @@ React.createElement("span", null, '\u00D7')) |
{ | ||
"name": "cosmo-ui", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "Common React components", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -9,4 +9,2 @@ import { StylableComponent } from '.' | ||
export interface ModalRootProps { | ||
} | ||
export interface ModalRootProps {} |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1077995
0