Skip to content
This repository has been archived by the owner on Oct 19, 2021. It is now read-only.

Commit

Permalink
refactor(Modal): rename buttonIsFocusable property to beingOpen
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Jun 19, 2018
1 parent ca8b154 commit f462ae5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ export default class Modal extends Component {

componentDidUpdate(prevProps) {
if (!prevProps.open && this.props.open) {
this.buttonIsFocusable = true;
this.beingOpen = true;
} else if (prevProps.open && !this.props.open) {
this.buttonIsFocusable = false;
this.beingOpen = false;
}
}

Expand All @@ -72,10 +72,10 @@ export default class Modal extends Component {
if (
this.outerModal.offsetWidth &&
this.outerModal.offsetHeight &&
this.buttonIsFocusable
this.beingOpen
) {
this.focusButton();
this.buttonIsFocusable = false;
this.beingOpen = false;
}
};

Expand Down

0 comments on commit f462ae5

Please sign in to comment.