fix: null checks in FDVideoHeroBlock
This commit is contained in:
parent
d7f3a52838
commit
4e9e51004f
@ -56,7 +56,7 @@ export const FDVideoHeroBlockComponent: React.FC<FDVideoHeroBlockProps> = (props
|
|||||||
black: 'bg-black',
|
black: 'bg-black',
|
||||||
navy: 'bg-fd-navy',
|
navy: 'bg-fd-navy',
|
||||||
}
|
}
|
||||||
const overlayClass = hasOverlay
|
const overlayClass = hasOverlay && overlayColor && overlayStrength
|
||||||
? `${overlayBgMap[overlayColor] || ''} ${overlayOpacityMap[overlayStrength] || 'opacity-50'}`
|
? `${overlayBgMap[overlayColor] || ''} ${overlayOpacityMap[overlayStrength] || 'opacity-50'}`
|
||||||
: ''
|
: ''
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ export const FDVideoHeroBlockComponent: React.FC<FDVideoHeroBlockProps> = (props
|
|||||||
large: 'min-h-[80vh]',
|
large: 'min-h-[80vh]',
|
||||||
medium: 'min-h-[60vh]',
|
medium: 'min-h-[60vh]',
|
||||||
}
|
}
|
||||||
const heightClass = heightMap[minHeight] || 'min-h-screen'
|
const heightClass = heightMap[minHeight || "screen"] || 'min-h-screen'
|
||||||
|
|
||||||
// Text alignment
|
// Text alignment
|
||||||
const alignClass = textAlign === 'center' ? 'text-center items-center' : 'text-left items-start'
|
const alignClass = textAlign === 'center' ? 'text-center items-center' : 'text-left items-start'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user