|
@@ -4,9 +4,14 @@ import { useTranslation } from 'react-i18next'
|
|
|
import { PanelResizeHandleProps } from 'react-resizable-panels/dist/declarations/src/PanelResizeHandle'
|
|
import { PanelResizeHandleProps } from 'react-resizable-panels/dist/declarations/src/PanelResizeHandle'
|
|
|
import classNames from 'classnames'
|
|
import classNames from 'classnames'
|
|
|
|
|
|
|
|
|
|
+type HorizontalResizeHandleOwnProps = {
|
|
|
|
|
+ resizable?: boolean
|
|
|
|
|
+ onDoubleClick?: () => void
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
export const HorizontalResizeHandle: FC<
|
|
export const HorizontalResizeHandle: FC<
|
|
|
- { resizable?: boolean } & PanelResizeHandleProps
|
|
|
|
|
-> = ({ children, resizable = true, ...props }) => {
|
|
|
|
|
|
|
+ HorizontalResizeHandleOwnProps & PanelResizeHandleProps
|
|
|
|
|
+> = ({ children, resizable = true, onDoubleClick, ...props }) => {
|
|
|
const { t } = useTranslation()
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
@@ -16,6 +21,7 @@ export const HorizontalResizeHandle: FC<
|
|
|
'horizontal-resize-handle-enabled': resizable,
|
|
'horizontal-resize-handle-enabled': resizable,
|
|
|
})}
|
|
})}
|
|
|
title={t('resize')}
|
|
title={t('resize')}
|
|
|
|
|
+ onDoubleClick={() => onDoubleClick?.()}
|
|
|
>
|
|
>
|
|
|
{children}
|
|
{children}
|
|
|
</div>
|
|
</div>
|