4.6.201906041226 • Published 5 years ago

@dfeidao/fd-m000009 v4.6.201906041226

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

文字跑马灯

https://dfeidao.gitee.io/widgets-mobile/

Installation

yarn add --dev @dfeidao/fd-m000009

Usage

必须传入 text

<Marquee
	text={d<string>('text')}
	width={Dimensions.get('window').width}
	direction={'left'}
	onTextClick={a('a001') as unknown as (text: string) => void}
>
</Marquee>

Attributes

text: string;

显示文字

textStyle?: StyleProp;

文字样式

bgContainerStyle?: StyleProp;

背景样式

direction?: string;

方向('left','right')

duration?: number;

持续时间

height?: number;

控件高度

width?: number;

控件宽度

onTextClick?: (text: string) => void;

点击文字事件

完整使用示例

<Marquee
	text={d<string>('text')}
	width={Dimensions.get('window').width}
	height={100}
	direction='left'
	bgContainerStyle={{ backgroundColor: '#FFFF00' }}
	textStyle={{ fontSize: 16, color: '#FF0000' }}
	onTextClick={a('a001') as unknown as (text: string) => void}
></Marquee>