Skip to content

Commit

Permalink
fix: 修复 drawer cancelBtn 传入字符串无效
Browse files Browse the repository at this point in the history
  • Loading branch information
honkinglin committed Jun 9, 2022
1 parent 0ffaa31 commit 986a2ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drawer/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const Drawer = forwardRef((props: DrawerProps, ref: React.Ref<HTMLDivElement>) =

const defaultCancelBtn = (
<Button theme="default" onClick={onCancelClick} className={`${prefixCls}__cancel`}>
{cancelText}
{cancelBtn && typeof cancelBtn === 'string' ? cancelBtn : cancelText}
</Button>
);

Expand Down

0 comments on commit 986a2ae

Please sign in to comment.