Skip to content

Commit

Permalink
Remove clickOutsideDeactivates propType warning (#249)
Browse files Browse the repository at this point in the history
Update propTypes to match new focus-trap API

Co-authored-by: Stefan Cameron <stefan@stefcameron.com>
  • Loading branch information
bnhovde and stefcameron authored Jan 19, 2021
1 parent a8b7373 commit a4c3105
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eighty-wolves-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'focus-trap-react': patch
---

Update PropTypes for clickOutsideDeactivates to match latest focus-trap.
5 changes: 4 additions & 1 deletion src/focus-trap-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ FocusTrap.propTypes = {
PropTypes.func,
]),
escapeDeactivates: PropTypes.bool,
clickOutsideDeactivates: PropTypes.bool,
clickOutsideDeactivates: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.func,
]),
returnFocusOnDeactivate: PropTypes.bool,
setReturnFocus: PropTypes.oneOfType([
PropTypes.instanceOf(ElementType),
Expand Down

0 comments on commit a4c3105

Please sign in to comment.