-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing TS defs and fixing existing def (#1240)
* Add missing TS defs and fixing existing def Add TypeScript definitions for: - `EuiFieldNumber` - `EuiFormLabel` - `EuiSelect` Fix the `EuiTextColor` definition.
- Loading branch information
1 parent
aa50e32
commit bf3295a
Showing
6 changed files
with
85 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/// <reference path="../../common.d.ts" /> | ||
/// <reference path="../../icon/index.d.ts" /> | ||
|
||
import { ReactNode, SFC, InputHTMLAttributes } from 'react'; | ||
|
||
declare module '@elastic/eui' { | ||
|
||
/** | ||
* text field type defs | ||
* | ||
* @see './field_number.js' | ||
*/ | ||
export interface EuiFieldNumberProps { | ||
icon?: IconType; | ||
isInvalid?: boolean; | ||
fullWidth?: boolean; | ||
isLoading?: boolean; | ||
compressed?: boolean; | ||
prepend?: ReactNode | ReactNode[]; | ||
append?: ReactNode | ReactNode[]; | ||
} | ||
|
||
export const EuiFieldNumber: SFC< | ||
CommonProps & InputHTMLAttributes<HTMLInputElement> & EuiFieldNumberProps | ||
>; | ||
} |
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,17 @@ | ||
/// <reference path="../../common.d.ts" /> | ||
|
||
import { SFC, ReactNode, LabelHTMLAttributes } from 'react'; | ||
|
||
declare module '@elastic/eui' { | ||
/** | ||
* @see './form_label.js' | ||
*/ | ||
|
||
export type EuiFormLabelProps = CommonProps & | ||
LabelHTMLAttributes<HTMLLabelElement> & { | ||
isFocused?: boolean; | ||
isInvalid?: boolean; | ||
}; | ||
|
||
export const EuiFormLabel: SFC<EuiFormLabelProps>; | ||
} |
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
/// <reference path="./checkbox/index.d.ts" /> | ||
/// <reference path="./field_text/index.d.ts" /> | ||
/// <reference path="./field_number/index.d.ts" /> | ||
/// <reference path="./field_search/index.d.ts" /> | ||
/// <reference path="./field_text/index.d.ts" /> | ||
/// <reference path="./form_label/index.d.ts" /> | ||
/// <reference path="./form_row/index.d.ts" /> | ||
/// <reference path="./radio/index.d.ts" /> | ||
/// <reference path="./select/index.d.ts" /> | ||
/// <reference path="./switch/index.d.ts" /> | ||
/// <reference path="./text_area/index.d.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,26 @@ | ||
/// <reference path="../../common.d.ts" /> | ||
|
||
import {SFC, ReactNode, Ref, OptionHTMLAttributes, SelectHTMLAttributes} from 'react'; | ||
|
||
declare module '@elastic/eui' { | ||
/** | ||
* @see './select.js' | ||
*/ | ||
|
||
export type EuiSelectProps = CommonProps & | ||
SelectHTMLAttributes<HTMLSelectElement> & { | ||
name?: string; | ||
id?: string; | ||
options: Array<{ text: ReactNode } & OptionHTMLAttributes<HTMLOptionElement>>; | ||
isInvalid?: boolean; | ||
fullWidth?: boolean; | ||
isLoading?: boolean; | ||
hasNoInitialSelection?: boolean; | ||
inputRef?: Ref<HTMLSelectElement>; | ||
compressed?: boolean; | ||
prepend?: ReactNode | ReactNode[]; | ||
append?: ReactNode | ReactNode[]; | ||
}; | ||
|
||
export const EuiSelect: SFC<EuiSelectProps>; | ||
} |
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