fix: add Drawer Spin className (#48857)

* fix: add Spin className

* fix: update snap
This commit is contained in:
lijianan 2024-05-10 14:31:21 +08:00 committed by GitHub
parent 6da1ad1c67
commit 32b89e6d87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 5 deletions

View File

@ -157,7 +157,12 @@ const DrawerPanel: React.FC<DrawerPanelProps> = (props) => {
}, [footer, footerStyle, prefixCls]);
if (spinProps?.spinning) {
return <Spin {...spinProps} />;
return (
<Spin
{...spinProps}
className={classNames(spinProps.className, `${prefixCls}-content-spin`)}
/>
);
}
return (

View File

@ -26,7 +26,7 @@ exports[`Drawer Drawer loading have a spinner 1`] = `
<div
aria-busy="true"
aria-live="polite"
class="ant-spin ant-spin-spinning"
class="ant-spin ant-spin-spinning ant-drawer-content-spin"
>
<span
class="ant-spin-dot ant-spin-dot-spin"

View File

@ -2816,7 +2816,7 @@ Array [
<div
aria-busy="true"
aria-live="polite"
class="ant-spin ant-spin-spinning"
class="ant-spin ant-spin-spinning ant-drawer-content-spin"
>
<span
class="ant-spin-dot ant-spin-dot-spin"

View File

@ -28,7 +28,6 @@ export interface DrawerToken extends FullToken<'Drawer'> {}
// =============================== Base ===============================
const genDrawerStyle: GenerateStyle<DrawerToken> = (token) => {
const {
antCls,
borderRadiusSM,
componentCls,
zIndexPopup,
@ -148,7 +147,7 @@ const genDrawerStyle: GenerateStyle<DrawerToken> = (token) => {
overflow: 'auto',
background: colorBgElevated,
pointerEvents: 'auto',
[`${antCls}-spin`]: {
[`${componentCls}-content-spin`]: {
width: '100%',
height: '100%',
display: 'flex',