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" />
/// <reference types="next/image-types/global" /> /// <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 // NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. // 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} style={wrapperStyle}
> >
{/* Header: image takes priority, otherwise render text */} {/* Header: image takes priority, otherwise render text */}
{/* Header styles (border, borderRadius, etc.) apply to both image and text modes */}
{headerImageUrl ? ( {headerImageUrl ? (
// eslint-disable-next-line @next/next/no-img-element <div style={{ ...headerStyle, padding: 0, overflow: 'hidden' }}>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img <img
src={resolve(headerImageUrl)} src={resolve(headerImageUrl)}
alt='' alt=''
className='w-full h-auto object-cover rounded-lg' className='w-full h-auto object-cover'
draggable={false} draggable={false}
/> />
</div>
) : headerText ? ( ) : headerText ? (
<div style={headerStyle}>{headerText}</div> <div style={headerStyle}>{headerText}</div>
) : null} ) : null}