mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-04 14:49:01 +02:00
db98f5132b
Update error logs designs for new editor GitOrigin-RevId: 0de3a54446a0ff114a1debb7b5f274d3a8f19c42
32 lines
823 B
TypeScript
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>
|
|
)
|
|
}
|