Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/moayadnajd/nativescript-reviews

Your awesome NativeScript plugin for render a reviews box
https://github.com/moayadnajd/nativescript-reviews

Last synced: 10 days ago
JSON representation

Your awesome NativeScript plugin for render a reviews box

Awesome Lists containing this project

README

        

# Nativescript Reviews

### ready to use reviews box

## Install

```
tns plugin add nativescript-reviews
```
[click here to Download fontawesome-webfont.ttf](https://github.com/moayadnajd/nativescript-fontawesome/blob/master/fonts/fontawesome-webfont.ttf) or download from [fontawesome website](http://fontawesome.io/)

* Place font icon `.ttf` file in `app/fonts`, like below:

```
app/fonts/fontawesome-webfont.ttf
```

### Usage
```

```

#### with more options
```

```
## refresh() this function you can triger after you get remote data

let review = getViewById('review');
//you can do remote request or delay
review.refresh(); // then refresh your values

## see [demo](https://github.com/moayadnajd/nativescript-reviews/tree/master/demo) for more details

| Property | Default | Description |
| --- | --- | --- |
| reviews | required | Array of reivew object {image: "~/images/icon-50.png", username: "Moayad Najdawi", review: "this is the first review", rate: 5, datetime: new Date(Date.now() - 24 * 60 * 60 * 1000)}|
| scroll | true | enable or disable scrollview inside the reviews holder |
| showHeader | true | to hide or show review title with the underline style |
| imagetag | | the xml element of the image so you can change it if you need to add cache plugin or something |
| plugin | empty string | plugin include statment like xmlns:IC="nativescript-web-image-cache" |
| title | reviews | the title of the reviews box |
| dateHandler | a go | you can change the date text by provide filter inside app resources see app.ts |
| user | event | fire on tap on user image or name return the review object |