From 9fa989d744fcf5bcf7cd00a42b123eaf9eb240ff Mon Sep 17 00:00:00 2001 From: Daniel Heath Date: Fri, 17 Jul 2020 14:12:02 +1000 Subject: [PATCH] Add HighlightedTextProps to typescript type definitions --- src/index.d.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index 877bbd3..c2e0049 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -34,6 +34,7 @@ export interface SimpleSelectProps { groupsAsColumns?: boolean; hideResetButton?: boolean; highlightedUid?: any; + id?: string; name?: string; open?: boolean; onBlur?(event: SimpleSelectEvent): void; @@ -43,7 +44,7 @@ export interface SimpleSelectProps { onOpenChange?(open: boolean): void; onPaste?(event: SimpleSelectEvent): void; onSearchChange?(search: string): void; - onValueChange?(item: OptionValue): void; + onValueChange?(item: OptionValue): void; options?: OptionValue[]; placeholder?: string; renderGroupTitle?(index: number, group: any): React.ReactElement; @@ -55,7 +56,7 @@ export interface SimpleSelectProps { restoreOnBackspace?(item: OptionValue): string; search?: string; serialize?(item: OptionValue): string; - style?: any; + style?: React.CSSProperties; tether?: boolean; 'tether-props'?: any; theme?: string; @@ -69,7 +70,7 @@ export interface SimpleSelectProps { } declare class SimpleSelect extends React.Component { - + } export interface MultiSelectProps extends SimpleSelectProps { @@ -91,5 +92,14 @@ export interface MultiSelectProps extends SimpleSelectProps { } declare class MultiSelect extends React.Component { - -} \ No newline at end of file + +} + +export interface HighlightedTextProps { + partitions: Array<[number, number, string]> + text: string + style?: React.CSSProperties + highlightStyle?: React.CSSProperties +} +export class HighlightedText extends React.Component {} +