Skip to content

Commit

Permalink
update AutocompleteItem typedefs (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Shwery committed Oct 31, 2019
1 parent 138e393 commit c1dacf4
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,18 +451,26 @@ declare module 'evergreen-ui' {
export class Alert extends React.PureComponent<AlertProps> {
}

export interface AutocompleteItemProps {
isSelected: boolean
isHighlighted: boolean
key: string
interface OptionProps extends TableRowProps {
height?: number | string
label: string
icon?: string
disabled?: boolean
}

export interface AutocompleteItemProps extends OptionProps {
children?: OptionProps['label']
}

export class AutocompleteItem extends React.PureComponent<AutocompleteItemProps> {
}

// https://github.com/downshift-js/downshift
export interface AutocompleteProps {
defaultSelectedItem?: string
title?: React.ReactNode
items: any[]
renderItem?: (i: AutocompleteItemProps) => React.ComponentClass<AutocompleteItemProps>
renderItem?: (i: AutocompleteItemProps) => AutocompleteItem
itemsFilter?: (items: string[], input: string) => string[]
itemToString?: (i: any) => string
children: (props: {
Expand Down Expand Up @@ -2268,9 +2276,6 @@ declare module 'evergreen-ui' {

type UnknownProps = Record<string, any>

export class AutocompleteItem extends React.PureComponent<UnknownProps> {
}

export class FilePicker extends React.PureComponent<UnknownProps> {
}

Expand Down

0 comments on commit c1dacf4

Please sign in to comment.