DropButton 不能配置 className 问题修复 (#1735)

This commit is contained in:
liaoxuezhi 2021-04-02 00:22:23 +08:00 committed by GitHub
parent 5101e65d0a
commit 7ec04cadeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -238,6 +238,7 @@ export default class DropDownButton extends React.Component<
block,
disabled,
btnDisabled,
btnClassName,
size,
label,
level,
@ -252,11 +253,15 @@ export default class DropDownButton extends React.Component<
return (
<div
className={cx('DropDown ', {
'DropDown--block': block,
'DropDown--alignRight': align === 'right',
'is-opened': this.state.isOpened
})}
className={cx(
'DropDown ',
{
'DropDown--block': block,
'DropDown--alignRight': align === 'right',
'is-opened': this.state.isOpened
},
className
)}
ref={this.domRef}
>
<TooltipWrapper
@ -271,7 +276,7 @@ export default class DropDownButton extends React.Component<
disabled={disabled || btnDisabled}
className={cx(
'Button',
className,
btnClassName,
typeof level === 'undefined'
? 'Button--default'
: level