mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
chore(Drawer): Improve warning message wording and demo doc (#39207)
* Improve warning message wording * Improve wording in demo * Fix test
This commit is contained in:
parent
4679790deb
commit
33e06a2b92
@ -237,7 +237,7 @@ describe('Drawer', () => {
|
||||
|
||||
render(<Drawer getContainer={false} style={{ position: 'absolute' }} />);
|
||||
expect(errorSpy).toHaveBeenCalledWith(
|
||||
'Warning: [antd: Drawer] `style` is move to `rootStyle` in v5. Please confirm `position: absolute` is necessary.',
|
||||
'Warning: [antd: Drawer] `style` is replaced by `rootStyle` in v5. Please check that `position: absolute` is necessary.',
|
||||
);
|
||||
|
||||
errorSpy.mockRestore();
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
Render in current dom. custom container, check `getContainer`.
|
||||
|
||||
Note: `style` and `className` is move to Drawer panel in v5 which is align with Modal component. Origin `style` and `className` is replaced by `rootStyle` and `rootClassName`.
|
||||
Note: `style` and `className` props are moved to Drawer panel in v5 which is aligned with Modal component. Original `style` and `className` props are replaced by `rootStyle` and `rootClassName`.
|
||||
|
||||
```css
|
||||
.site-drawer-render-in-current-wrapper {
|
||||
|
@ -98,7 +98,7 @@ function Drawer(props: DrawerProps) {
|
||||
warning(
|
||||
false,
|
||||
'Drawer',
|
||||
'`style` is move to `rootStyle` in v5. Please confirm `position: absolute` is necessary.',
|
||||
'`style` is replaced by `rootStyle` in v5. Please check that `position: absolute` is necessary.',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user