Skip to content

Commit 603aae4

Browse files
committed
feat:添加通告栏组件实例
1 parent febc78f commit 603aae4

File tree

1 file changed

+31
-0
lines changed
  • example/examples/src/routes/NoticeBar

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React from 'react'
2+
import { Image, Text, View } from 'react-native'
3+
import { NoticeBar, WingBlank } from '@uiw/react-native';
4+
5+
6+
export default class NoticeBarExample extends React.Component{
7+
render() {
8+
const customIcon = (
9+
<Image
10+
// tslint:disable-next-line:jsx-no-multiline-js
11+
source={{
12+
uri: 'https://zos.alipayobjects.com/rmsportal/bRnouywfdRsCcLU.png',
13+
}}
14+
style={{ width: 12, height: 12 }}
15+
/>
16+
)
17+
return (
18+
<View style={{ marginTop: 10 }}>
19+
<WingBlank size="large">
20+
{/* marqueeProps.style only support text style props*/}
21+
<NoticeBar
22+
onPress={() => console.log('click')}
23+
marqueeProps={{ loop: true, style: { fontSize: 12, color: 'red' } }}>
24+
Notice: The arrival time of incomes and transfers of Yu 'E Bao will be
25+
delayed during National Day.
26+
</NoticeBar>
27+
</WingBlank>
28+
</View>
29+
)
30+
}
31+
}

0 commit comments

Comments
 (0)