Skip to content

Commit

Permalink
Update documentation and README
Browse files Browse the repository at this point in the history
  • Loading branch information
cristijora committed Jun 13, 2017
1 parent d0cb348 commit acbf70d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 86 deletions.
86 changes: 1 addition & 85 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,89 +7,5 @@ Vue-tabs is a tab component which simplifies the usage of tabs and their customi
* [Full width centered tabs with text bellow](https://jsfiddle.net/CristiJ/b44cc4dq/29/)
* [Vertical tabs](https://jsfiddle.net/CristiJ/b44cc4dq/32/)

## Usage
## NPM
`npm install vue-nav-tabs`
## [Documentation](https://cristijora.github.io/vue-tabs/#/)

## Or alternatively directly include the javascript
Download the css and js files from `dist` folder or reference them directly from github (check jsfiddle links)
```html
<link rel="stylesheet" href="vue-tabs.min.css">
<script src="vue-tabs.js"></script>
```
## Component registration
```js
//global registration
import VueTabs from 'vue-nav-tabs'
import 'vue-nav-tabs/dist/vue-tabs.min.css'
Vue.use(VueTabs)

//local registration
import {VueTabs, VTab} from 'vue-nav-tabs'
import 'vue-nav-tabs/dist/vue-tabs.min.css'
//component code
components: {
VueTabs,
VTab
}
```
```html
<vue-tabs>
<v-tab title="First tab">
First tab content
</v-tab>

<v-tab title="Second tab">
Second tab content
</v-tab>

<v-tab title="Third tab">
Third tab content
</v-tab>
</vue-tabs>
```

# Props

## Vue-tabs props
```js
props: {
title: {
type: String,
default: ''
},
/***
* Icon name for the upper circle corresponding to the tab
* Supports themify icons only for now.
*/
icon: {
type: String,
default: ''
},
/***
* Function to execute before tab switch. Return value must be boolean
* If the return result is false, tab switch is restricted
*/
beforeChange: {
type: Function
},
route: {
type: [String, Object]
}
}
```

## V-tab props

```js
props: {
title: {
type: String,
default: ''
},
icon: {
type: String,
default: ''
}
}
```
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Download the css and js files from `dist` folder or reference them directly from
<link rel="stylesheet" href="https://unpkg.com/vue-nav-tabs/dist/vue-tabs.min.css">
<script src="https://unpkg.com/vue-nav-tabs/dist/vue-tabs.js"></script>

Vue.use(VueTabs)
```
## Component registration
```js
Expand Down

0 comments on commit acbf70d

Please sign in to comment.