fixed gallery header styles inconsistance

This commit is contained in:
Dmitri 2026-04-03 10:06:56 +04:00
parent 4e431eab9b
commit ca3b3725f9
3 changed files with 12 additions and 9 deletions

View File

@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference path="./build/types/routes.d.ts" />
/// <reference path="./.next/types/routes.d.ts" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

File diff suppressed because one or more lines are too long

View File

@ -100,14 +100,17 @@ const GalleryElement: React.FC<GalleryElementProps> = ({
style={wrapperStyle}
>
{/* Header: image takes priority, otherwise render text */}
{/* Header styles (border, borderRadius, etc.) apply to both image and text modes */}
{headerImageUrl ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={resolve(headerImageUrl)}
alt=''
className='w-full h-auto object-cover rounded-lg'
draggable={false}
/>
<div style={{ ...headerStyle, padding: 0, overflow: 'hidden' }}>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={resolve(headerImageUrl)}
alt=''
className='w-full h-auto object-cover'
draggable={false}
/>
</div>
) : headerText ? (
<div style={headerStyle}>{headerText}</div>
) : null}