add embedded mode to BaseSection so parents can host the save action

This commit is contained in:
Josh Hawkins
2026-05-16 06:43:57 -05:00
parent c6eadfebb8
commit f9600cafe3
@@ -175,6 +175,9 @@ export interface BaseSectionProps {
isSavingAll?: boolean;
/** Callback when this section's saving state changes */
onSavingChange?: (isSaving: boolean) => void;
/** When true, render the form fields only; suppress the internal save/undo bar.
* The parent owns the save action and reads pending data via `onPendingDataChange`. */
embedded?: boolean;
}
export interface CreateSectionOptions {
@@ -211,6 +214,7 @@ export function ConfigSection({
onDeleteProfileSection,
isSavingAll = false,
onSavingChange,
embedded = false,
}: ConfigSectionProps) {
// For replay level, treat as camera-level config access
const effectiveLevel = level === "replay" ? "camera" : level;
@@ -1048,6 +1052,7 @@ export function ConfigSection({
}}
/>
{!embedded && (
<div
className={cn(
"w-full border-t border-secondary bg-background pt-0",
@@ -1163,6 +1168,7 @@ export function ConfigSection({
</div>
</div>
</div>
)}
<AlertDialog open={isResetDialogOpen} onOpenChange={setIsResetDialogOpen}>
<AlertDialogContent>