style: fix close button hide delay (#3082)

This commit is contained in:
Goze 2021-11-29 16:05:45 +08:00 committed by GitHub
parent 4cb27d54e2
commit 06118d22a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,12 +225,14 @@ export class Drawer extends React.Component<DrawerProps, DrawerState> {
fadeStyles[status]
)}
>
<a
onClick={disabled ? undefined : onHide}
className={`${ns}Drawer-close`}
>
<Icon icon="close" className="icon" />
</a>
{show ? (
<a
onClick={disabled ? undefined : onHide}
className={`${ns}Drawer-close`}
>
<Icon icon="close" className="icon" />
</a>
) : null}
{status === EXITED ? null : children}
</div>
</div>