Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bradmartin committed Mar 7, 2019
1 parent 8b9dfb4 commit 50250b9
Showing 1 changed file with 17 additions and 23 deletions.
40 changes: 17 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,7 @@

## Installation

##### NativeScript 4x

- `tns plugin add nativescript-cardview`

##### NativeScript 3x

- `tns plugin add [email protected]`

##### NativeScript 2.x

- `tns plugin add [email protected]`
`tns plugin add nativescript-cardview`

Be sure to run a new build after adding plugins to avoid any issues. Here is a post with some details: [Plugin Not Working after adding to project.](https://bradmartin.net/2016/07/20/ahhh-this-nativescript-plugin-doesnt-work/_)

Expand All @@ -51,17 +41,17 @@ Be sure to run a new build after adding plugins to avoid any issues. Here is a p

##### [CardView Android Documentation](http://developer.android.com/intl/zh-tw/reference/android/support/v7/widget/CardView.html)

### Usage
## Usage

_iOS note: Setting a background-color will help if you do not see the card on the page._

## Plain NativeScript
### NativeScript Plain

<span style="color:red">IMPORTANT: </span>_Make sure you include `xmlns:Card="nativescript-cardview"` on the Page element_

### XML
#### XML

```XML
```xml
<Page xmlns:Card="nativescript-cardview">
<StackLayout>
<Card:CardView class="cardStyle" margin="10" elevation="40" radius="5">
Expand All @@ -76,16 +66,18 @@ _iOS note: Setting a background-color will help if you do not see the card on th
</Page>
```

### CSS
#### CSS

```CSS
```css
.cardStyle {
background-color: #3489db;
color: #fff;
background-color: #3489db;
color: #fff;
}
```

## NativeScript + Angular
---

### NativeScript Angular

```typescript
import { registerElement } from 'nativescript-angular/element-registry';
Expand Down Expand Up @@ -146,7 +138,9 @@ registerElement('CardView', () => CardView);
</CardView>
```

## NativeScript + Vue
---

### NativeScript Vue

```javascript
import Vue from 'nativescript-vue';
Expand All @@ -164,7 +158,7 @@ Vue.registerElement(
</card-view>
```

## Attributes
### Attributes

- **radius** _optional_

Expand Down Expand Up @@ -216,7 +210,7 @@ shadowOpacity = 0.4;
shadowRadius = 1;
```

## Sample Screenshots
### Sample Screenshots

#### Android

Expand Down

0 comments on commit 50250b9

Please sign in to comment.