mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
refactor: rewrite inline-style to cssinjs (#48832)
* refactor: rewrite inline-style to cssinjs * test: fix snap
This commit is contained in:
parent
300ec22f33
commit
b87dbc91ae
@ -157,18 +157,7 @@ const DrawerPanel: React.FC<DrawerPanelProps> = (props) => {
|
||||
}, [footer, footerStyle, prefixCls]);
|
||||
|
||||
if (spinProps?.spinning) {
|
||||
return (
|
||||
<Spin
|
||||
spinning={false}
|
||||
style={{
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
}}
|
||||
{...spinProps}
|
||||
/>
|
||||
);
|
||||
return <Spin {...spinProps} />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -27,7 +27,6 @@ exports[`Drawer Drawer loading have a spinner 1`] = `
|
||||
aria-busy="true"
|
||||
aria-live="polite"
|
||||
class="ant-spin ant-spin-spinning"
|
||||
style="height: 100%; display: flex; justify-content: center; align-items: center;"
|
||||
>
|
||||
<span
|
||||
class="ant-spin-dot ant-spin-dot-spin"
|
||||
|
@ -2817,7 +2817,6 @@ Array [
|
||||
aria-busy="true"
|
||||
aria-live="polite"
|
||||
class="ant-spin ant-spin-spinning"
|
||||
style="height: 100%; display: flex; justify-content: center; align-items: center;"
|
||||
>
|
||||
<span
|
||||
class="ant-spin-dot ant-spin-dot-spin"
|
||||
|
@ -28,6 +28,7 @@ export interface DrawerToken extends FullToken<'Drawer'> {}
|
||||
// =============================== Base ===============================
|
||||
const genDrawerStyle: GenerateStyle<DrawerToken> = (token) => {
|
||||
const {
|
||||
antCls,
|
||||
borderRadiusSM,
|
||||
componentCls,
|
||||
zIndexPopup,
|
||||
@ -147,6 +148,13 @@ const genDrawerStyle: GenerateStyle<DrawerToken> = (token) => {
|
||||
overflow: 'auto',
|
||||
background: colorBgElevated,
|
||||
pointerEvents: 'auto',
|
||||
[`${antCls}-spin`]: {
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
},
|
||||
|
||||
// Header
|
||||
|
Loading…
Reference in New Issue
Block a user