Skip to content

Commit

Permalink
feat(steps): 增加types
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczj committed Nov 5, 2018
1 parent 7906467 commit b73c0fa
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions @types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export { default as AtToast } from './toast'
export { default as AtTabsPane } from './tabs-pane'
export { default as AtSwipeAction } from './swipe-action'
export { default as AtAccordion } from './accordion'
export { default as AtSteps } from './steps'

export declare const AtModalHeader: ComponentClass
export declare const AtModalAction: ComponentClass
Expand Down
38 changes: 38 additions & 0 deletions @types/steps.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { MouseEvent, ComponentClass } from 'react'
import { BaseEventFunction } from '@tarojs/components/types/common'

import AtComponent from './base'

export interface Icon {
value?: string

activeColor?: string

inactiveColor?: string

size?: string|number
}

export interface Item {
title?: string

desc?: string

icon?: Icon

success?: boolean

error?: boolean
}

export interface AtStepsProps extends AtComponent {
current?: number

items?: Array<Item>

onChange: (current: number, event: BaseEventFunction) => void
}

declare const AtSteps: ComponentClass<AtStepsProps>

export default AtSteps

0 comments on commit b73c0fa

Please sign in to comment.