|
@ -43,7 +43,7 @@ interface CollapseInterface extends React.FC<CollapseProps> { |
|
|
|
|
|
|
|
|
const Collapse: CollapseInterface = props => { |
|
|
const Collapse: CollapseInterface = props => { |
|
|
const { getPrefixCls, direction } = React.useContext(ConfigContext); |
|
|
const { getPrefixCls, direction } = React.useContext(ConfigContext); |
|
|
const { prefixCls: customizePrefixCls, className = '', bordered, ghost } = props; |
|
|
const { prefixCls: customizePrefixCls, className = '', bordered = true, ghost } = props; |
|
|
const prefixCls = getPrefixCls('collapse', customizePrefixCls); |
|
|
const prefixCls = getPrefixCls('collapse', customizePrefixCls); |
|
|
|
|
|
|
|
|
const getIconPosition = () => { |
|
|
const getIconPosition = () => { |
|
@ -83,6 +83,7 @@ const Collapse: CollapseInterface = props => { |
|
|
<RcCollapse |
|
|
<RcCollapse |
|
|
openAnimation={openAnimation} |
|
|
openAnimation={openAnimation} |
|
|
{...props} |
|
|
{...props} |
|
|
|
|
|
bordered={bordered} |
|
|
expandIcon={(panelProps: PanelProps) => renderExpandIcon(panelProps)} |
|
|
expandIcon={(panelProps: PanelProps) => renderExpandIcon(panelProps)} |
|
|
prefixCls={prefixCls} |
|
|
prefixCls={prefixCls} |
|
|
className={collapseClassName} |
|
|
className={collapseClassName} |
|
@ -92,8 +93,4 @@ const Collapse: CollapseInterface = props => { |
|
|
|
|
|
|
|
|
Collapse.Panel = CollapsePanel; |
|
|
Collapse.Panel = CollapsePanel; |
|
|
|
|
|
|
|
|
Collapse.defaultProps = { |
|
|
|
|
|
bordered: true, |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
export default Collapse; |
|
|
export default Collapse; |
|
|