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:
Arnaud Benhamdine 2022-12-03 12:36:03 +01:00 committed by GitHub
parent 4679790deb
commit 33e06a2b92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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 {

View File

@ -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.',
);
}
}