rsuite
Version:
A suite of react components
30 lines (29 loc) • 1.2 kB
TypeScript
import React from 'react';
import { BoxProps } from '../internals/Box';
type KeyType = string | number;
export interface PanelGroupProps<T = KeyType> extends BoxProps {
/** Whether it is a collapsible panel. */
accordion?: boolean;
/** Expand the Panel, corresponding to the 'Panel' of 'eventkey' */
activeKey?: T;
/** Show border */
bordered?: boolean;
/** The default expansion panel. */
defaultActiveKey?: T;
/** Primary content */
children?: React.ReactNode;
/** Toggles the callback function for the expand panel */
onSelect?: (eventKey: T | undefined, event: React.SyntheticEvent) => void;
}
interface PanelGroupContext {
accordion?: boolean;
activeKey?: KeyType;
onGroupSelect?: (activeKey: KeyType | undefined, event: React.MouseEvent) => void;
}
export declare const PanelGroupContext: React.Context<PanelGroupContext>;
/**
* The `PanelGroup` component is used to display content that can be collapsed.
* @see https://rsuitejs.com/components/panel
*/
declare const PanelGroup: import("../internals/types").InternalRefForwardingComponent<"div", PanelGroupProps<KeyType>, never> & Record<string, never>;
export default PanelGroup;