kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Change attachment-thumbs to use only Tailwind
rodzic
37ec22379c
commit
08fcb5ef97
|
@ -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>
|
||||||
);
|
);
|
||||||
|
|
Ładowanie…
Reference in New Issue