The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/components/ImageGallery/ImageGalleryLoading.tsx

23 lines
703 B

import { css } from '@rocket.chat/css-in-js';
import { IconButton, ModalBackdrop, Throbber } from '@rocket.chat/fuselage';
import { createPortal } from 'react-dom';
import { useTranslation } from 'react-i18next';
const closeButtonStyle = css`
position: absolute;
z-index: 10;
top: 10px;
right: 10px;
`;
export const ImageGalleryLoading = ({ onClose }: { onClose: () => void }) => {
const { t } = useTranslation();
return createPortal(
<ModalBackdrop display='flex' justifyContent='center' color='pure-white'>
<IconButton icon='cross' aria-label={t('Close_gallery')} className={closeButtonStyle} onClick={onClose} />
<Throbber inheritColor />
</ModalBackdrop>,
document.body,
);
};