(props: {
ref: (el: HTMLDivElement | undefined) => void
children: JSX.Element
handleDragStart?: (e: any) => void
})
| 3 | createHeight, |
| 4 | } from '../context/use-devtools-context' |
| 5 | import { createStyles } from '../styles/use-styles' |
| 6 | import { createPiPWindow } from '../context/pip-context' |
| 7 | import { |
| 8 | PANEL_CLOSE_THRESHOLD, |
| 9 | PANEL_MAX_VIEWPORT_RATIO, |
| 10 | } from '../utils/constants' |
| 11 | import type { JSX } from 'solid-js/jsx-runtime' |
| 12 | |
| 13 | export const ContentPanel = (props: { |
| 14 | ref: (el: HTMLDivElement | undefined) => void |
| 15 | children: JSX.Element |
| 16 | handleDragStart?: (event: MouseEvent) => void |
| 17 | handleHeightChange?: (height: number) => void |
| 18 | }) => { |
| 19 | const styles = createStyles() |
| 20 | const { settings } = createDevtoolsSettings() |
| 21 | const { height } = createHeight() |
| 22 | const pip = createPiPWindow() |
| 23 | const maxHeight = () => |
| 24 | Math.floor(window.innerHeight * PANEL_MAX_VIEWPORT_RATIO) |
| 25 | const clampedHeight = () => |
| 26 | Math.min(maxHeight(), Math.max(PANEL_CLOSE_THRESHOLD, Math.round(height()))) |
| 27 | const resizeWithKeyboard: JSX.EventHandlerUnion< |
nothing calls this directly
no test coverage detected