Files
element-plus/packages/components/select-v2/src/token.ts
三咲智子 0636e1e240 style: add import and stricter lint (#3440)
* style: add import lint

* chore: apply eslint rules

* chore: add stricter lint

* chore: lint all files

* auto fix

* manually fix

* restore build-indices.ts
2021-09-17 15:27:31 +08:00

17 lines
668 B
TypeScript

import type { OptionProps, SelectProps } from './defaults'
import type { ExtractPropTypes, InjectionKey } from 'vue'
import type { Option } from './select.types'
export interface SelectV2Context {
props: ExtractPropTypes<typeof SelectProps>
expanded: boolean
onSelect: (option: Option<any>, index: number, byClick?: boolean) => void
onKeyboardNavigate: (direction: 'forward' | 'backward') => void
onKeyboardSelect: () => void
}
export const selectV2InjectionKey =
'ElSelectV2Injection' as any as InjectionKey<SelectV2Context>
export type IOptionProps = ExtractPropTypes<typeof OptionProps>
export type ISelectProps = ExtractPropTypes<typeof SelectProps>