Skip to content

Commit

Permalink
add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanyu104 committed May 4, 2018
1 parent 77b2fbd commit 5b04a50
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ node_modules/*
npm-debug.*
.DS_Store
npm-debug.log.*
yarn-error.log.*
yarn-error.log
etc/*
59 changes: 58 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
# react-native-awesome-marquee
# react-native-awesome-marquee
[![MIT](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/ryanyu104/react-native-awesome-marquee/ryanyu104/master/LICENSE.md)
[![npm downloads](https://img.shields.io/npm/dm/react-native-awesome-marquee.svg)](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
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Marquee.propTypes = {

Marquee.defaultProps = {
duration: 10000,
height: 200,
height: 100,
};


Expand Down
2 changes: 1 addition & 1 deletion yarn-error.log
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Platform:
npm manifest:
{
"name": "react-native-awesome-marquee",
"version": "1.0.3",
"version": "1.0.4",
"description": "Awesome marquee",
"main": "index.js",
"repository": "https://github.com/ryanyu104/react-native-awesome-marquee.git",
Expand Down

0 comments on commit 5b04a50

Please sign in to comment.