fix: move ViewToggle into header bars and remove subtitle
Eliminates the dedicated ViewToggle row on CockpitPage by merging it into IncidentHeader's action group via extraActions prop. Removes subtitle from ViewToggle component entirely — the icon + label is self-explanatory. Cleans up showSubtitle prop from all call sites. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,8 @@ interface IncidentHeaderProps {
|
||||
onStatusUpdate?: () => void
|
||||
onPause?: () => void
|
||||
onClose?: () => void
|
||||
/** Extra elements rendered in the action group (e.g. ViewToggle) */
|
||||
extraActions?: React.ReactNode
|
||||
}
|
||||
|
||||
interface EditPopoverProps {
|
||||
@@ -168,6 +170,7 @@ export function IncidentHeader({
|
||||
onStatusUpdate,
|
||||
onPause,
|
||||
onClose,
|
||||
extraActions,
|
||||
}: IncidentHeaderProps) {
|
||||
return (
|
||||
<div className="bg-card border-b border-default px-4 py-2 flex items-center gap-4 flex-wrap">
|
||||
@@ -223,6 +226,7 @@ export function IncidentHeader({
|
||||
</button>
|
||||
)}
|
||||
<OverflowMenu onPause={onPause} onClose={onClose} />
|
||||
{extraActions}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user