Skip to content

Commit

Permalink
[chore] specifiy the object when overriding class names.
Browse files Browse the repository at this point in the history
check for a precise object when setting class names
(className and overlayClassName) as object.
  • Loading branch information
diasbruno committed Oct 18, 2017
1 parent 4ca54df commit 59fbdb3
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,22 @@ export default class Modal extends Component {
}),
portalClassName: PropTypes.string,
bodyOpenClassName: PropTypes.string,
className: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
overlayClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
className: PropTypes.oneOfType([
PropTypes.string,
PropTypes.shape({
base: PropTypes.string.isRequired,
afterOpen: PropTypes.string.isRequired,
beforeClose: PropTypes.string.isRequired
})
]),
overlayClassName: PropTypes.oneOfType([
PropTypes.string,
PropTypes.shape({
base: PropTypes.string.isRequired,
afterOpen: PropTypes.string.isRequired,
beforeClose: PropTypes.string.isRequired
})
]),
appElement: PropTypes.instanceOf(SafeHTMLElement),
onAfterOpen: PropTypes.func,
onRequestClose: PropTypes.func,
Expand Down

0 comments on commit 59fbdb3

Please sign in to comment.