import React from 'react'; import PropTypes from 'prop-types'; import { ComponentProps } from '../utils/types'; interface PanelPropsBase { children?: React.ReactNode; /** * A React ref which is set to the DOM element when the component mounts and null when it unmounts. */ elementRef?: React.Ref; /** * Used internally, func passed in from outer place is overwritten * by SlidingPanels during rendering * @private */ onMount?: (panel: HTMLDivElement | null, panelId: any) => void; /** * Used internally, func passed in from outer place is overwritten * by SlidingPanels during rendering * @private */ onUnmount?: (panelId: any) => void; /** * A unique `id` for this panel and used by the SlidingPanels to keep track of the open panel. */ panelId: string | number; } type PanelProps = ComponentProps; /** * Container for arbitrary content. */ declare function Panel({ children, elementRef, onMount, onUnmount, panelId, ...otherProps }: PanelProps): React.JSX.Element; declare namespace Panel { var propTypes: { children: PropTypes.Requireable; elementRef: PropTypes.Requireable; /** @private */ onMount: PropTypes.Requireable<(...args: any[]) => any>; /** @private */ onUnmount: PropTypes.Requireable<(...args: any[]) => any>; panelId: PropTypes.Validator>>; }; } export default Panel; export { PanelPropsBase };