-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
4 changed files
with
61 additions
and
4 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 |
---|---|---|
|
@@ -2,5 +2,5 @@ node_modules/* | |
npm-debug.* | ||
.DS_Store | ||
npm-debug.log.* | ||
yarn-error.log.* | ||
yarn-error.log | ||
etc/* |
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 |
---|---|---|
@@ -1 +1,58 @@ | ||
# react-native-awesome-marquee | ||
# react-native-awesome-marquee | ||
[](https://github.com/ryanyu104/react-native-awesome-marquee/ryanyu104/master/LICENSE.md) | ||
[](https://www.npmjs.com/package/react-native-awesome-marquee) | ||
|
||
|
||
## Table of contents | ||
- [Install](#install) | ||
- [Usage](#usage) | ||
- [Options](#options) | ||
|
||
## Install | ||
|
||
`yarn add react-native-awesome-marquee@latest ` | ||
|
||
## Usage | ||
|
||
```javascript | ||
|
||
import React, { Component } from 'react'; | ||
import Marquee from "react-native-awesome-marquee" | ||
|
||
|
||
class Example extends Component { | ||
constructor(props) { | ||
super(props) | ||
} | ||
render() { | ||
return ( | ||
<View> | ||
<Marquee | ||
duration={20000} | ||
height={100} | ||
> | ||
<View> | ||
<Text>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.</Text> | ||
</View> | ||
<View> | ||
<Text>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.</Text> | ||
</View> | ||
<View> | ||
<Text>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim.</Text> | ||
</View> | ||
</Marquee> | ||
</View> | ||
) | ||
} | ||
|
||
} | ||
|
||
``` | ||
|
||
### Options | ||
|
||
Key | Type | Defalut | Description | ||
------ | ---- | ---- | ---- | ||
duration | number | 10000 | millseconds | ||
height | number | 100 | wrapper component's height | ||
children| element | null | Custom element |
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 |
---|---|---|
|
@@ -80,7 +80,7 @@ Marquee.propTypes = { | |
|
||
Marquee.defaultProps = { | ||
duration: 10000, | ||
height: 200, | ||
height: 100, | ||
}; | ||
|
||
|
||
|
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