Skip to content

Commit

Permalink
[components] Revert dialog's click outside behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard authored and rexxars committed Oct 6, 2020
1 parent 7483d27 commit 85aad1b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/@sanity/components/src/dialogs/DefaultDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ function DefaultDialog(props: DefaultDialogProps) {

const className = classNames(
styles.root,
// styles[color],
actions && actions.length > 0 && styles.hasFunctions,
classNameProp
)
Expand All @@ -69,8 +68,7 @@ function DefaultDialog(props: DefaultDialogProps) {

const handleClickOutside = useCallback(() => {
if (onClickOutside) onClickOutside()
if (onClose) onClose()
}, [onClickOutside, onClose])
}, [onClickOutside])

const closeButtonColor =
color && ['danger', 'success', 'warning'].includes(color) ? 'white' : undefined
Expand Down

0 comments on commit 85aad1b

Please sign in to comment.