+
+ Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid.
+ Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
+
+
+
+
+ );
+ }
+}
+
+React.render(, mountNode);
diff --git a/src/Fade.js b/src/Fade.js
new file mode 100644
index 0000000000..b91cb32b51
--- /dev/null
+++ b/src/Fade.js
@@ -0,0 +1,90 @@
+'use strict';
+import React from 'react';
+import Transition from './Transition';
+
+class Fade extends React.Component {
+
+ constructor(props, context){
+ super(props, context);
+ }
+
+ render() {
+ return (
+
+ { this.props.children }
+
+ );
+ }
+}
+
+Fade.propTypes = {
+ /**
+ * Fade the Component in or out.
+ */
+ in: React.PropTypes.bool,
+
+ /**
+ * Provide the durration of the animation in milliseconds, used to ensure that finishing callbacks are fired even if the
+ * original browser transition end events are canceled.
+ */
+ duration: React.PropTypes.number,
+
+ /**
+ * A Callback fired before the component starts to fade in.
+ */
+ onEnter: React.PropTypes.func,
+
+ /**
+ * A Callback fired immediately after the component has started to faded in.
+ */
+ onEntering: React.PropTypes.func,
+
+ /**
+ * A Callback fired after the component has faded in.
+ */
+ onEntered: React.PropTypes.func,
+
+ /**
+ * A Callback fired before the component starts to fade out.
+ */
+ onExit: React.PropTypes.func,
+
+ /**
+ * A Callback fired immediately after the component has started to faded out.
+ */
+ onExiting: React.PropTypes.func,
+
+ /**
+ * A Callback fired after the component has faded out.
+ */
+ onExited: React.PropTypes.func,
+
+
+ /**
+ * Specify whether the transitioning component should be unmounted (removed from the DOM) once the exit animation finishes.
+ */
+ unmountOnExit: React.PropTypes.bool,
+
+ /**
+ * Specify whether the component should fade in or out when it mounts.
+ */
+ transitionAppear: React.PropTypes.bool
+
+};
+
+Fade.defaultProps = {
+ in: false,
+ duration: 300,
+ dimension: 'height',
+ transitionAppear: false,
+ unmountOnExit: false
+};
+
+export default Fade;
+
diff --git a/src/Modal.js b/src/Modal.js
index 3816318c51..55df65f433 100644
--- a/src/Modal.js
+++ b/src/Modal.js
@@ -4,11 +4,11 @@ import React, { cloneElement } from 'react';
import classNames from 'classnames';
import createChainedFunction from './utils/createChainedFunction';
import BootstrapMixin from './BootstrapMixin';
-import FadeMixin from './FadeMixin';
import domUtils from './utils/domUtils';
import EventListener from './utils/EventListener';
import Portal from './Portal';
+import Fade from './Fade';
import Body from './ModalBody';
import Header from './ModalHeader';
@@ -90,12 +90,17 @@ function getScrollbarSize(){
document.body.removeChild(scrollDiv);
scrollDiv = null;
+ return scrollbarSize;
}
const ModalMarkup = React.createClass({
+<<<<<<< HEAD
mixins: [ BootstrapMixin, FadeMixin ],
+=======
+ mixins: [ BootstrapMixin ],
+>>>>>>> [added] Fade Component, replaces FadeMixin
propTypes: {
@@ -166,8 +171,7 @@ const ModalMarkup = React.createClass({
let classes = {
modal: true,
- fade: this.props.animation,
- 'in': !this.props.animation
+ in: this.props.show && !this.props.animation
};
let modal = (
@@ -206,18 +210,22 @@ const ModalMarkup = React.createClass({
},
renderBackdrop(modal) {
- let classes = {
- 'modal-backdrop': true,
- fade: this.props.animation,
- 'in': !this.props.animation
- };
-
- let onClick = this.props.backdrop === true ?
- this.handleBackdropClick : null;
+ let { animation } = this.props;
+ let duration = Modal.BACKDROP_TRANSITION_DURATION; //eslint-disable-line no-use-before-define
+
+ let backdrop = (
+
+ );
return (