UNPKG

@kvaser/canking-api

Version:

CanKing API to communicate with the CanKing service using Node.js.

42 lines (41 loc) 1.67 kB
/** * This module includes a drop down panel UI control, a panel that will be displayed when * the mouse is hovering over a specific area. * * To be able to use these controls the CanKingDataProvider component must be present in the * component tree above your component. Normally the CanKingDataProvider is added * at the root of the component tree. * * @packageDocumentation */ import React from 'react'; /** * Properties of the DropdownPanel React component. */ export interface DropdownPanelProps { /** The component id. */ id?: string; /** The position of the panel in relation to the parent. */ position: 'left' | 'top' | 'right' | 'bottom'; /** The parent's width in pixels. */ parentWidth: number; /** The parent's height in pixels. */ parentHeight: number; /** The maximum length of the panel, either height or width depending on position. */ maxLength: number; /** The size of the panel, either height or width depending on position. */ dropDownSize: number; /** Force the panel to be visible even if not hovered. */ forceShow?: boolean; /** The time in milliseconds until the panel will auto-hide */ autoHideTimeout?: number; /** The children that will be displayed in the panel. */ children?: React.ReactNode; } /** * Creates a drop down panel control. * @param props Component properties. * @returns The DropdownPanel React component. */ declare function DropdownPanel({ id, position, parentWidth, parentHeight, maxLength, dropDownSize, autoHideTimeout, forceShow, children, }: DropdownPanelProps): import("react/jsx-runtime").JSX.Element; export default DropdownPanel;