choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
47 lines (46 loc) • 1.75 kB
TypeScript
import React, { Component, CSSProperties, ReactNode } from 'react';
import ConfigContext, { ConfigContextValue } from '../config-provider/ConfigContext';
export declare type ExpandIconPosition = 'left' | 'right' | 'text-right';
export declare type TriggerMode = 'icon' | 'header';
export interface PanelProps {
isActive?: boolean;
header?: ReactNode;
className?: string;
style?: CSSProperties;
showArrow?: boolean;
forceRender?: boolean;
disabled?: boolean;
extra?: ReactNode;
}
export interface CollapseProps {
activeKey?: Array<string> | string;
defaultActiveKey?: Array<string>;
/** 手风琴效果 */
accordion?: boolean;
onChange?: (key: string | string[]) => void;
style?: CSSProperties;
className?: string;
bordered?: boolean;
prefixCls?: string;
expandIcon?: (panelProps: PanelProps) => ReactNode | 'text';
expandIconPosition?: ExpandIconPosition;
trigger?: TriggerMode;
ghost?: boolean;
}
export default class Collapse extends Component<CollapseProps, any> {
static displayName: string;
static get contextType(): typeof ConfigContext;
static Panel: React.FunctionComponent<import("./CollapsePanel").CollapsePanelProps>;
static defaultProps: {
bordered: boolean;
openAnimation: {
appear(): void;
enter(node: HTMLElement, done: () => void): any;
leave(node: HTMLElement, done: () => void): any;
};
};
context: ConfigContextValue;
renderExpandIcon: (panelProps?: PanelProps) => {} | null | undefined;
renderExpandTextContent: (panelProps: PanelProps | undefined, locale: any, localeCode: any, expandIconPositionCof: any) => JSX.Element;
render(): JSX.Element;
}