diff --git a/build/simple-modal.js b/build/simple-modal.js index 0ecfaad..36715c0 100755 --- a/build/simple-modal.js +++ b/build/simple-modal.js @@ -44,13 +44,13 @@ var Modal = (function (_React$Component) { key: 'render', value: function render() { if (!this.props.show) return null; - var modalStyle = _extends({}, _styles2['default'].modal, this.props.style); - var containerStyle = _extends({}, _styles2['default'].container, this.props.containerStyle); - //completely overwrite if they use a class if (this.props.className) { modalStyle = this.props.style; containerStyle = this.props.containerStyle; + } else { + var modalStyle = _extends({}, _styles2['default'].modal, this.props.style); + var containerStyle = _extends({}, _styles2['default'].container, this.props.containerStyle); } return _react2['default'].createElement( diff --git a/dist/simple-react-modal.js b/dist/simple-react-modal.js index f2e5d63..3e8e8e5 100644 --- a/dist/simple-react-modal.js +++ b/dist/simple-react-modal.js @@ -46,13 +46,13 @@ var Modal = (function (_React$Component) { key: 'render', value: function render() { if (!this.props.show) return null; - var modalStyle = _extends({}, _styles2['default'].modal, this.props.style); - var containerStyle = _extends({}, _styles2['default'].container, this.props.containerStyle); - //completely overwrite if they use a class if (this.props.className) { modalStyle = this.props.style; containerStyle = this.props.containerStyle; + } else { + var modalStyle = _extends({}, _styles2['default'].modal, this.props.style); + var containerStyle = _extends({}, _styles2['default'].container, this.props.containerStyle); } return _react2['default'].createElement( diff --git a/dist/simple-react-modal.min.js b/dist/simple-react-modal.min.js index cce9a6e..509e15c 100644 --- a/dist/simple-react-modal.min.js +++ b/dist/simple-react-modal.min.js @@ -1 +1 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.simpleModal=e()}}(function(){return function e(t,o,n){function r(l,u){if(!o[l]){if(!t[l]){var a="function"==typeof require&&require;if(!u&&a)return a(l,!0);if(i)return i(l,!0);var f=new Error("Cannot find module '"+l+"'");throw f.code="MODULE_NOT_FOUND",f}var s=o[l]={exports:{}};t[l][0].call(s.exports,function(e){var o=t[l][1][e];return r(o?o:e)},s,s.exports,e,t,o,n)}return o[l].exports}for(var i="function"==typeof require&&require,l=0;l - X -
hey
+ X +
hey
diff --git a/package.json b/package.json index 05a42ce..5ca07cd 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "simple-react-modal", "description": "The simplest modal", - "version": "0.3.1", + "version": "0.3.2", "main": "./build/simple-modal.js", "directories": { "example": "example" diff --git a/src/simple-modal.js b/src/simple-modal.js index 3b4e45d..ad458db 100755 --- a/src/simple-modal.js +++ b/src/simple-modal.js @@ -15,14 +15,15 @@ export default class Modal extends React.Component{ render(){ if(!this.props.show) return null - var modalStyle = Object.assign({},styles.modal,this.props.style) - var containerStyle = Object.assign({},styles.container,this.props.containerStyle) - //completely overwrite if they use a class if(this.props.className){ modalStyle = this.props.style containerStyle = this.props.containerStyle } + else{ + var modalStyle = Object.assign({}, styles.modal ,this.props.style) + var containerStyle = Object.assign({},styles.container,this.props.containerStyle) + } return (