fix(site-builder): HeroSimple canvas render uses the exporter's declaration order (style wins over minHeight prop)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7a1ab36e63
commit
01d5ba5496
2 files changed
+41
-2
No files matched your search
@@ -109,16 +109,19 @@ export const HeroSimple: UserComponent<HeroProps> = ({
|
||||
<section
|
||||
ref={(ref: HTMLElement | null): void => { if (ref) connect(drag(ref)); }}
|
||||
id={anchorId || undefined}
|
||||
// Same declaration ORDER as toHtml (published output is the source of truth):
|
||||
// computed defaults first, the node's own `style` last so style.minHeight /
|
||||
// padding / display ... win over the `minHeight` prop and the built-ins.
|
||||
style={{
|
||||
...style,
|
||||
...heroBackgroundStyle({ bgType, bgColor, bgGradientFrom, bgGradientTo, bgGradientAngle, bgImage, bgPosition } as HeroProps),
|
||||
minHeight: minHeight === '100vh' ? '100vh' : minHeight,
|
||||
minHeight: minHeight || '500px',
|
||||
display: 'flex',
|
||||
alignItems: justifyMap[verticalAlign] || 'center',
|
||||
justifyContent: 'center',
|
||||
position: 'relative',
|
||||
overflow: 'hidden',
|
||||
padding: '60px 20px',
|
||||
...style,
|
||||
}}
|
||||
>
|
||||
{/* Video background */}
|
||||
|
||||
Reference in new issue
Block a user