Skip to content

Commit

Permalink
feat : update for reviewer
Browse files Browse the repository at this point in the history
  • Loading branch information
heiyu4585 committed Dec 5, 2022
1 parent a1eaf24 commit 26ece61
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/app/demo/message.md
Expand Up @@ -4,4 +4,4 @@

## en-US

Static method for `obtaining message`.
Static method for `message`.
15 changes: 10 additions & 5 deletions components/app/demo/message.tsx
@@ -1,14 +1,19 @@
import React from 'react';
import { App } from 'antd';
import { App, Button } from 'antd';

// Sub page
const MyPage = () => {
const { message } = App.useApp();
React.useEffect(() => {
message.success('Good!');
}, [message]);

return <div>Hello World</div>;
const showMessage = () => {
message.success('Success!');
};

return (
<Button type="primary" onClick={showMessage}>
Open message
</Button>
);
};

// Entry component
Expand Down
2 changes: 1 addition & 1 deletion components/app/demo/notification.tsx
Expand Up @@ -15,7 +15,7 @@ const MyPage = () => {

return (
<Button type="primary" onClick={showNotification}>
Open Notification
Open notification
</Button>
);
};
Expand Down

0 comments on commit 26ece61

Please sign in to comment.