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/app/threads/client/components/ThreadSkeleton.tsx

44 lines
1.0 KiB

import React, { FC, useMemo } from 'react';
import { Modal, Box } from '@rocket.chat/fuselage';
import VerticalBar from '../../../../client/components/VerticalBar';
type ThreadSkeletonProps = {
expanded: boolean;
onClose: () => void;
};
const ThreadSkeleton: FC<ThreadSkeletonProps> = ({ expanded, onClose }) => {
const style = useMemo(() => (document.dir === 'rtl'
? {
left: 0,
borderTopRightRadius: 4,
}
: {
right: 0,
borderTopLeftRadius: 4,
}), []);
return <>
{expanded && <Modal.Backdrop onClick={onClose} />}
<Box width='380px' flexGrow={1} position={expanded ? 'static' : 'relative'}>
<VerticalBar.Skeleton
className='rcx-thread-view'
position='absolute'
display='flex'
flexDirection='column'
width={expanded ? 'full' : 380}
maxWidth={855}
overflow='hidden'
zIndex={100}
insetBlock={0}
// insetInlineEnd={0}
// borderStartStartRadius={4}
style={style} // workaround due to a RTL bug in Fuselage
/>
</Box>
</>;
};
export default ThreadSkeleton;