Skip to content

Commit

Permalink
remove ownFocus from ConfirmModal
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl committed Feb 15, 2021
1 parent 7b63d5c commit 995bb3c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
5 changes: 1 addition & 4 deletions x-pack/plugins/security/public/components/confirm_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ export interface ConfirmModalProps extends Omit<EuiModalProps, 'onClose' | 'init
isDisabled?: EuiButtonProps['isDisabled'];
onCancel(): void;
onConfirm(): void;
ownFocus?: boolean;
}

/**
* Component that renders a confirmation modal similar to `EuiConfirmModal`, except that
* it adds `isLoading` prop, which renders a loading spinner and disables action buttons,
* and `ownFocus` prop to render overlay mask.
* it adds `isLoading` prop, which renders a loading spinner and disables action buttons.
*/
export const ConfirmModal: FunctionComponent<ConfirmModalProps> = ({
children,
Expand All @@ -44,7 +42,6 @@ export const ConfirmModal: FunctionComponent<ConfirmModalProps> = ({
isDisabled,
onCancel,
onConfirm,
ownFocus = true,
title,
...rest
}) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export const ConfirmDeleteUsers: FunctionComponent<ConfirmDeleteUsersProps> = ({
)}
confirmButtonColor="danger"
isLoading={state.loading}
ownFocus
>
<EuiText>
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export const ConfirmDisableUsers: FunctionComponent<ConfirmDisableUsersProps> =
}
confirmButtonColor={isSystemUser ? 'danger' : undefined}
isLoading={state.loading}
ownFocus
>
{isSystemUser ? (
<EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export const ConfirmEnableUsers: FunctionComponent<ConfirmEnableUsersProps> = ({
}
)}
isLoading={state.loading}
ownFocus
>
<EuiText>
<p>
Expand Down

0 comments on commit 995bb3c

Please sign in to comment.