-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72d92b1
commit 04bef73
Showing
7 changed files
with
166 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
packages/autocomplete-js/src/types/AutocompletePropGetters.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { | ||
BaseItem, | ||
AutocompleteApi as AutocompleteCoreApi, | ||
} from '@algolia/autocomplete-core'; | ||
|
||
import { AutocompleteState } from './AutocompleteState'; | ||
|
||
export type AutocompletePropGetters<TItem extends BaseItem> = { | ||
getEnvironmentProps(params: { | ||
state: AutocompleteState<TItem>; | ||
props: ReturnType<AutocompleteCoreApi<TItem>['getEnvironmentProps']>; | ||
}): ReturnType<AutocompleteCoreApi<TItem>['getEnvironmentProps']>; | ||
getFormProps(params: { | ||
state: AutocompleteState<TItem>; | ||
props: ReturnType<AutocompleteCoreApi<TItem>['getFormProps']>; | ||
}): ReturnType<AutocompleteCoreApi<TItem>['getFormProps']>; | ||
getInputProps(params: { | ||
state: AutocompleteState<TItem>; | ||
props: ReturnType<AutocompleteCoreApi<TItem>['getInputProps']>; | ||
inputElement: HTMLInputElement; | ||
}): ReturnType<AutocompleteCoreApi<TItem>['getInputProps']>; | ||
getItemProps(params: { | ||
state: AutocompleteState<TItem>; | ||
props: ReturnType<AutocompleteCoreApi<TItem>['getItemProps']>; | ||
}): ReturnType<AutocompleteCoreApi<TItem>['getItemProps']>; | ||
getLabelProps(params: { | ||
state: AutocompleteState<TItem>; | ||
props: ReturnType<AutocompleteCoreApi<TItem>['getLabelProps']>; | ||
}): ReturnType<AutocompleteCoreApi<TItem>['getLabelProps']>; | ||
getListProps(params: { | ||
state: AutocompleteState<TItem>; | ||
props: ReturnType<AutocompleteCoreApi<TItem>['getListProps']>; | ||
}): ReturnType<AutocompleteCoreApi<TItem>['getListProps']>; | ||
getPanelProps(params: { | ||
state: AutocompleteState<TItem>; | ||
props: ReturnType<AutocompleteCoreApi<TItem>['getPanelProps']>; | ||
}): ReturnType<AutocompleteCoreApi<TItem>['getPanelProps']>; | ||
getRootProps(params: { | ||
state: AutocompleteState<TItem>; | ||
props: ReturnType<AutocompleteCoreApi<TItem>['getRootProps']>; | ||
}): ReturnType<AutocompleteCoreApi<TItem>['getRootProps']>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters