Change attachment-thumbs to use only Tailwind

fix-build-warnings
danidfra 2024-11-02 19:10:09 -03:00
rodzic 37ec22379c
commit 08fcb5ef97
1 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -17,11 +17,11 @@ const AttachmentThumbs = (props: IAttachmentThumbs) => {
const { media, onClick, sensitive } = props; const { media, onClick, sensitive } = props;
const dispatch = useAppDispatch(); const dispatch = useAppDispatch();
const fallback = <div className='media-gallery--compact' />; const fallback = <div className='!h-[50px] bg-transparent' />;
const onOpenMedia = (media: ImmutableList<Attachment>, index: number) => dispatch(openModal('MEDIA', { media, index })); const onOpenMedia = (media: ImmutableList<Attachment>, index: number) => dispatch(openModal('MEDIA', { media, index }));
return ( return (
<div className='attachment-thumbs'> <div className='relative'>
<Suspense fallback={fallback}> <Suspense fallback={fallback}>
<MediaGallery <MediaGallery
media={media} media={media}
@ -34,7 +34,11 @@ const AttachmentThumbs = (props: IAttachmentThumbs) => {
</Suspense> </Suspense>
{onClick && ( {onClick && (
<div className='attachment-thumbs__clickable-region' onClick={onClick} /> <button
className='absolute inset-0 size-full cursor-pointer'
onClick={onClick}
style={{ background: 'none', border: 'none', padding: 0 }}
/>
)} )}
</div> </div>
); );