Skip to content

Commit

Permalink
Export select option type (#2830)
Browse files Browse the repository at this point in the history
* export option type

* rename option

* Update index.ts

* minor fixes

* don't export type via js, add to changelog

* Update CHANGELOG.md

update changelog

* Update CHANGELOG.md

changelog entry style

Co-authored-by: Chandler Prall <[email protected]>
  • Loading branch information
mattkime and chandlerprall authored Feb 10, 2020
1 parent 2444426 commit 7ba5fd6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Converted `EuiFilePicker` to TypeScript ([#2832](https://github.com/elastic/eui/issues/2832))
- Exported `EuiSelectOptionProps` type ([#2830](https://github.com/elastic/eui/pull/2830))

## [`19.0.0`](https://github.com/elastic/eui/tree/v19.0.0)

Expand Down
2 changes: 1 addition & 1 deletion src/components/form/select/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { EuiSelect, EuiSelectProps } from './select';
export { EuiSelect, EuiSelectProps, EuiSelectOptionProps } from './select';
5 changes: 3 additions & 2 deletions src/components/form/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ import {
import { EuiValidatableControl } from '../validatable_control';
import { EuiFormControlLayoutIconsProps } from '../form_control_layout/form_control_layout_icons';

interface Option extends OptionHTMLAttributes<HTMLOptionElement> {
export interface EuiSelectOptionProps
extends OptionHTMLAttributes<HTMLOptionElement> {
text: React.ReactNode;
}

export type EuiSelectProps = SelectHTMLAttributes<HTMLSelectElement> &
CommonProps & {
options?: Option[];
options?: EuiSelectOptionProps[];
isInvalid?: boolean;
fullWidth?: boolean;
isLoading?: boolean;
Expand Down

0 comments on commit 7ba5fd6

Please sign in to comment.