Skip to content

Commit

Permalink
Merge pull request reactjs#84 from existentialism/typos
Browse files Browse the repository at this point in the history
Fix a couple typos/misspellings/missing semi
  • Loading branch information
mzabriskie committed Oct 18, 2015
2 parents acdcb7c + 78fa9bd commit c7153d1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
v0.5.0 - Tue, 22 Sep 2015 19:19:44 GMT
--------------------------------------

- [4d25989](../../commit/4d25989) [added] Inline CSS for modal and overlay as well as props to override. [changed] injectCSS has been changed to a warning message in preperation for a future removal. lib/components/Modal.js [changed] setAppElement method is now optional. Defaults to document.body and now allows for a css selector to be passed in rather than the whole element.
- [4d25989](../../commit/4d25989) [added] Inline CSS for modal and overlay as well as props to override. [changed] injectCSS has been changed to a warning message in preparation for a future removal. lib/components/Modal.js [changed] setAppElement method is now optional. Defaults to document.body and now allows for a css selector to be passed in rather than the whole element.
- [02cf2c3](../../commit/02cf2c3) [fixed] Clear the closeWithTimeout timer before unmounting


Expand Down
4 changes: 2 additions & 2 deletions lib/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var Modal = module.exports = React.createClass({
displayName: 'Modal',
statics: {
setAppElement: ariaAppHider.setElement,
injectCSS : function() {
injectCSS: function() {
"production" !== process.env.NODE_ENV
&& console.warn('React-Modal: injectCSS has been deprecated ' +
'and no longer has any effect. It will be removed in a later version');
Expand All @@ -21,7 +21,7 @@ var Modal = module.exports = React.createClass({

propTypes: {
isOpen: React.PropTypes.bool.isRequired,
style : React.PropTypes.shape({
style: React.PropTypes.shape({
content: React.PropTypes.object,
overlay: React.PropTypes.object
}),
Expand Down
11 changes: 5 additions & 6 deletions lib/components/ModalPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ var CLASS_NAMES = {
};

var defaultStyles = {
overlay : {
overlay: {
position : 'fixed',
top : 0,
left : 0,
right : 0,
bottom : 0,
backgroundColor : 'rgba(255, 255, 255, 0.75)'
},
content : {
content: {
position : 'absolute',
top : '40px',
left : '40px',
Expand All @@ -41,7 +41,6 @@ var defaultStyles = {
borderRadius : '4px',
outline : 'none',
padding : '20px'

}
};

Expand All @@ -56,10 +55,10 @@ var ModalPortal = module.exports = React.createClass({
getDefaultProps: function() {
return {
style: {
overlay : {},
content : {}
overlay: {},
content: {}
}
}
};
},

getInitialState: function() {
Expand Down
6 changes: 3 additions & 3 deletions lib/helpers/focusManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ function handleFocus(event) {
}
// need to see how jQuery shims document.on('focusin') so we don't need the
// setTimeout, firefox doesn't support focusin, if it did, we could focus
// the the element outisde of a setTimeout. Side-effect of this
// implementation is that the document.body gets focus, and then we focus
// our element right after, seems fine.
// the element outside of a setTimeout. Side-effect of this implementation
// is that the document.body gets focus, and then we focus our element right
// after, seems fine.
setTimeout(function() {
if (modalElement.contains(document.activeElement))
return;
Expand Down
4 changes: 2 additions & 2 deletions specs/Modal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('Modal', function () {
equal(modal.portal.refs.content.style.width, '20px');
});

it('supports overridding style on the modal contents', function() {
it('supports overriding style on the modal contents', function() {
var modal = renderModal({isOpen: true, style: {content: {position: 'static'}}});
equal(modal.portal.refs.content.style.position, 'static');
});
Expand All @@ -119,7 +119,7 @@ describe('Modal', function () {
equal(modal.portal.refs.overlay.style.width, '75px');
});

it('supports overridding style on the modal overlay', function() {
it('supports overriding style on the modal overlay', function() {
var modal = renderModal({isOpen: true, style: {overlay: {position: 'static'}}});
equal(modal.portal.refs.overlay.style.position, 'static');
});
Expand Down

0 comments on commit c7153d1

Please sign in to comment.