Skip to content

Commit

Permalink
Improve documentation on TabContent type definitions, and order pro…
Browse files Browse the repository at this point in the history
…ps in alignment with props declared in `TabContent.vue`.
  • Loading branch information
Charles Salmon committed Feb 27, 2019
1 parent 7209900 commit c412282
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions types/TabContent.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
import Vue from 'vue'

export declare class Tab extends Vue {
/** Title to be displayed under each step */
title?: string
/** css class for each step icon */
icon?: string
/***
* Function to execute before tab switch. Return value must be boolean
* If the return result is false, tab switch is restricted
/**
* Title to be displayed under each step.
*
* Default value: ''
*/
title: string

/** CSS class to be applied to each step icon.
*
* Default value: ''
*/
icon: string

/**
* Function to execute before changing tabs. If the return result is false, the tab switch is restricted.
*/
beforeChange: () => boolean | Promise<boolean>

/**
* Function to execute after changing tabs. It is safe to assume that necessary validation has already occurred.
*/
afterChange: () => void

/**
* Vue router route object.
*/
beforeChange (): boolean | Promise<boolean>
/** Vue router route object */
route: string | object

/**
* Default value: () => {}
*/
additionalInfo: object
}

0 comments on commit c412282

Please sign in to comment.