mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 05:28:20 +08:00
24 lines
683 B
TypeScript
24 lines
683 B
TypeScript
import * as React from 'react';
|
|
import RcCollapse from 'rc-collapse';
|
|
import classNames from 'classnames';
|
|
|
|
export interface CollapsePanelProps {
|
|
key: string;
|
|
header: React.ReactNode;
|
|
disabled?: boolean;
|
|
className?: string;
|
|
style?: React.CSSProperties;
|
|
showArrow?: boolean;
|
|
prefixCls?: string;
|
|
}
|
|
|
|
export default class CollapsePanel extends React.Component<CollapsePanelProps, {}> {
|
|
render() {
|
|
const { prefixCls, className = '', showArrow = true } = this.props;
|
|
const collapsePanelClassName = classNames({
|
|
[`${prefixCls}-no-arrow`]: !showArrow,
|
|
}, className);
|
|
return <RcCollapse.Panel {...this.props} className={collapsePanelClassName} />;
|
|
}
|
|
}
|