-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Erindcl
committed
Jul 29, 2020
1 parent
36ab20f
commit 1a8e403
Showing
7 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
order: 0 | ||
title: | ||
zh-CN: 基本使用 | ||
--- | ||
|
||
## zh-CN | ||
|
||
最简单的用法,适用于信息提醒反馈。 | ||
|
||
共有四种样式 infor、success、warning、error。 | ||
|
||
```jsx | ||
import { message, Button } from 'antd'; | ||
|
||
const success = () => { | ||
message.success('This is a success message'); | ||
}; | ||
|
||
const error = () => { | ||
message.error('This is an error message'); | ||
}; | ||
|
||
const warning = () => { | ||
message.warning('This is a warning message'); | ||
}; | ||
|
||
const info = () => { | ||
message.info('This is a normal message'); | ||
}; | ||
|
||
ReactDOM.render( | ||
<div className="demo-message-box"> | ||
<Button onClick={info}>Info</Button> | ||
<Button onClick={success}>Success</Button> | ||
<Button onClick={error}>Error</Button> | ||
<Button onClick={warning}>Warning</Button> | ||
</div>, | ||
mountNode, | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
category: Components | ||
cols: 1 | ||
type: 反馈 | ||
title: Message | ||
subtitle: 全局提示 | ||
--- | ||
|
||
全局展示操作反馈信息。 | ||
|
||
## 设计规范 | ||
|
||
不同主题,背景色不一致,默认主题背景色为 #FFFFFF,暗黑主题背景色为 #1D1F2E。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@import '../const.less'; | ||
|
||
.ant-message-notice-content { | ||
box-shadow: 0px 2px 8px 0px #06070A; | ||
height: 40px; | ||
font-size: 14px; | ||
color: @whiteBF; | ||
.anticon { | ||
font-size: 16px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters