diff --git a/CHANGELOG.md b/CHANGELOG.md index 078bc8ff231..f818fcde842 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Added typings for 'EuiBadge' ([#1034](https://github.com/elastic/eui/pull/1034)) - Added a visual pattern for Kibana's Global Date Picker ([#1026](https://github.com/elastic/eui/pull/1026)) - Added `responsive` prop to `EuiFlexGrid` ([#1026](https://github.com/elastic/eui/pull/1026)) - Added `expand` prop to `EuiTabs` and `EuiTabbedContent` ([#1026](https://github.com/elastic/eui/pull/1026)) @@ -13,7 +14,6 @@ - To make it more accessible, added a random id to `EuiSwitch`'s id prop if none is passed. ([#779](https://github.com/elastic/eui/pull/779)) - ## [`3.1.0`](https://github.com/elastic/eui/tree/v3.1.0) - Added `EuiMutationObserver` to expose Mutation Observer API to React components ([#966](https://github.com/elastic/eui/pull/966)) diff --git a/src/components/badge/index.d.ts b/src/components/badge/index.d.ts new file mode 100644 index 00000000000..a4feee62569 --- /dev/null +++ b/src/components/badge/index.d.ts @@ -0,0 +1,23 @@ +/// + +import { HTMLAttributes, MouseEventHandler } from 'react'; + +declare module '@elastic/eui' { + + type IconSide = 'left'; + + export interface EuiBadgeProps { + iconType?: IconType; + iconSide?: IconSide; + iconOnClick?: MouseEventHandler; + iconOnClickAriaLabel?: string; + onClick?: MouseEventHandler; + onClickAriaLabel?: string; + color?: string; + closeButtonProps?: Object; + } + + export const EuiBadge: SFC< + CommonProps & HTMLAttributes & HTMLAttributes & EuiBadgeProps + >; +} diff --git a/src/components/index.d.ts b/src/components/index.d.ts index b34302413fa..6a985d717d8 100644 --- a/src/components/index.d.ts +++ b/src/components/index.d.ts @@ -24,3 +24,4 @@ /// /// /// +///