-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid forwarding close fn to skeleton modals
- Loading branch information
1 parent
bf03fe8
commit d714df9
Showing
7 changed files
with
17 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 5 additions & 17 deletions
22
apps/meteor/client/components/GenericModal/GenericModalSkeleton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
import { Skeleton } from '@rocket.chat/fuselage'; | ||
import { useTranslation } from '@rocket.chat/ui-contexts'; | ||
import type { ComponentProps } from 'react'; | ||
import React from 'react'; | ||
|
||
import GenericModal from './GenericModal'; | ||
|
||
const GenericModalSkeleton = ({ onClose, ...props }: ComponentProps<typeof GenericModal>) => { | ||
const t = useTranslation(); | ||
|
||
return ( | ||
<GenericModal | ||
{...props} | ||
variant='warning' | ||
onClose={onClose} | ||
title={<Skeleton width='50%' />} | ||
confirmText={t('Cancel')} | ||
onConfirm={onClose} | ||
> | ||
<Skeleton width='full' /> | ||
</GenericModal> | ||
); | ||
}; | ||
const GenericModalSkeleton = (props: ComponentProps<typeof GenericModal>) => ( | ||
<GenericModal {...props} icon={null} title={<Skeleton width='50%' />}> | ||
<Skeleton width='full' /> | ||
</GenericModal> | ||
); | ||
|
||
export default GenericModalSkeleton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 2 additions & 9 deletions
11
apps/meteor/client/views/teams/contextualBar/members/RemoveUsersModal/RemoveUsersModal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters