Skip to content

Commit

Permalink
Translation NoticeBar
Browse files Browse the repository at this point in the history
  • Loading branch information
ddcat1115 committed Apr 28, 2017
1 parent 54b789a commit 6ecad4d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
8 changes: 4 additions & 4 deletions components/notice-bar/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ const NoticeBarExample = () => (
<div>
<WhiteSpace size="lg" />
<NoticeBar marqueeProps={{ loop: true, style: { padding: '0 0.15rem' } }}>
国庆期间余额宝收益和转出到账时间通知:由于国庆到来,余额宝收益到账将延迟,特此通知
Notice: The arrival time of incomes and transfers of Yu &#39;E Bao will be delayed during National Day.
</NoticeBar>
<WhiteSpace size="lg" />
<NoticeBar mode="link" onClick={() => alert('1')}>
国庆期间余额宝收益和转出到账时间
Notice: The arrival time of incomes and transfers of Yu &#39;E Bao will be delayed during National Day.
</NoticeBar>
<WhiteSpace size="lg" />
<NoticeBar mode="closable" icon={null}>去除 NoticeBar 默认的喇叭图标</NoticeBar>
<NoticeBar mode="closable" icon={null}>Remove the default icon.</NoticeBar>
<WhiteSpace size="lg" />
<NoticeBar mode="closable" icon={<Icon type="check-circle-o" size="xxs" />}>
自定义 NoticeBar 前面的小图标
Customized icon.
</NoticeBar>
</div>
);
Expand Down
18 changes: 12 additions & 6 deletions components/notice-bar/demo/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,30 @@ export default class NoticeBarExample extends React.Component<any, any> {
return (
<View style={{ marginTop: 10 }}>
<WhiteSpace size="lg" />
<NoticeBar onClick={() => alert('click')}>国庆期间余额宝收益和转出到账时间</NoticeBar>
<NoticeBar onClick={() => alert('click')}>
Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day.
</NoticeBar>
<WhiteSpace size="lg" />
<NoticeBar mode="closable" onClick={() => alert('will close')}>
国庆期间余额宝收益和转出到账时间1
Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day.
</NoticeBar>
<WhiteSpace size="lg" />
<NoticeBar
mode="closable"
icon={customIcon}
>
自定义 NoticeBar 前面的图标
Customized icon.
</NoticeBar>
<WhiteSpace size="lg" />
<NoticeBar mode="link" onClick={() => alert('link')}>国庆期间余额宝收益和转出到账时间</NoticeBar>
<NoticeBar mode="link" onClick={() => alert('link')}>
Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day.
</NoticeBar>
<WhiteSpace size="lg" />
<NoticeBar mode="link">国庆期间余额宝收益和转出到账时间</NoticeBar>
<NoticeBar mode="link">
Notice: The arrival time of incomes and transfers of Yu 'E Bao will be delayed during National Day.
</NoticeBar>
<WhiteSpace size="lg" />
<NoticeBar mode="closable" icon={null}>去除 NoticeBar 默认的喇叭图标</NoticeBar>
<NoticeBar mode="closable" icon={null}>Remove the default icon.</NoticeBar>
</View>
);
}
Expand Down
15 changes: 8 additions & 7 deletions components/notice-bar/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ type: Data Display
title: NoticeBar
---

在导航栏下方,一般用作系统提醒、活动提醒等通知。
The NoticeBar is aimed for displaying a system message, event notice and etc. Which is under the navigation bar.

### 规则
- 需要引起用户关注时使用,重要级别低于 Modal ,高于 Toast。
### Rules

- Be used to attract user's attension, the importance level is lower than `Modal` and higher than `Toast`.

## API

Support WEB, React-Native.

Properties | Descrition | Type | Default
-----------|------------|------|--------
| mode | 提示类型,可选`closable`,`link` | String | '' |
| icon | notice 前的图标 | React.Element | `<Icon type={require('./trips.svg')} size="xxs" />`|
| onClick | 点击关闭或者操作区域的回调函数 | (): void | |
| marqueeProps (`web only`) | marquee 参数 | Object | `{loop: false, leading: 500, trailing: 800, fps: 40, style: {}}` |
| mode | Type of NoticeBar, options: `closable` `link` | String | '' |
| icon | To set the icon before notice | React.Element | `<Icon type={require('./trips.svg')} size="xxs" />`|
| onClick | A callback function, can be executed when you close the notice or click on the operating area | (): void | |
| marqueeProps (`web only`) | marquee params | Object | `{loop: false, leading: 500, trailing: 800, fps: 40, style: {}}` |

0 comments on commit 6ecad4d

Please sign in to comment.