2026-05-19 12:55:08 +02:00
|
|
|
import React from 'react'
|
2026-05-19 11:18:54 +02:00
|
|
|
import { Link } from 'react-router-dom'
|
|
|
|
|
import { useFormEditorActions } from '../context/FormEditorActionsContext'
|
|
|
|
|
|
|
|
|
|
/**
|
2026-05-19 12:55:08 +02:00
|
|
|
* Vollseiten-Editor: Zurück/Titel oben; FormActionBar fix unten (alle Viewports via FormEditorBottomSlot).
|
2026-05-19 11:18:54 +02:00
|
|
|
*/
|
|
|
|
|
export default function PageFormEditorChrome({
|
|
|
|
|
title,
|
|
|
|
|
backTo,
|
|
|
|
|
backLabel = 'Zurück',
|
|
|
|
|
actionConfig,
|
|
|
|
|
children,
|
|
|
|
|
testId,
|
|
|
|
|
}) {
|
|
|
|
|
useFormEditorActions(actionConfig)
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="page-form-editor" data-testid={testId}>
|
|
|
|
|
<header className="page-form-editor__header">
|
2026-05-19 12:55:08 +02:00
|
|
|
{backTo ? (
|
|
|
|
|
<Link to={backTo} className="page-form-editor__back">
|
|
|
|
|
← {backLabel}
|
|
|
|
|
</Link>
|
2026-05-19 11:18:54 +02:00
|
|
|
) : null}
|
2026-05-19 12:55:08 +02:00
|
|
|
<h1 className="page-form-editor__title">{title}</h1>
|
2026-05-19 11:18:54 +02:00
|
|
|
</header>
|
|
|
|
|
<div className="page-form-editor__body">{children}</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|