Files
overleaf-cep/services/web/frontend/js/features/ide-redesign/components/rail-panel-header.tsx
T
David db98f5132b Merge pull request #25939 from overleaf/dp-error-logs
Update error logs designs for new editor

GitOrigin-RevId: 0de3a54446a0ff114a1debb7b5f274d3a8f19c42
2025-06-05 08:05:11 +00:00

32 lines
823 B
TypeScript

import { useTranslation } from 'react-i18next'
import { useRailContext } from '../contexts/rail-context'
import OLIconButton from '@/features/ui/components/ol/ol-icon-button'
import React from 'react'
export default function RailPanelHeader({
title,
actions,
}: {
title: string
actions?: React.ReactNode[]
}) {
const { t } = useTranslation()
const { handlePaneCollapse } = useRailContext()
return (
<header className="rail-panel-header">
<h4 className="rail-panel-title">{title}</h4>
<div className="rail-panel-header-actions">
{actions}
<OLIconButton
onClick={handlePaneCollapse}
className="rail-panel-header-button-subdued"
icon="close"
accessibilityLabel={t('close')}
size="sm"
/>
</div>
</header>
)
}