Skip to content

Commit

Permalink
Add typings for EuiKeyPad (#1229)
Browse files Browse the repository at this point in the history
* Add typings for EuiKeyPad

* Remove explicit prop definitions

* Add changelog entry
  • Loading branch information
timroes authored Oct 3, 2018
1 parent 6063ed3 commit 8287342
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Added TypeScript typings for `EuiKeyPadMenu` ([#1229](https://github.com/elastic/eui/pull/1229))
- Force `EuiPopover` contents to stick to its initial position when the content changes ([#1199](https://github.com/elastic/eui/pull/1199))

**Bug fixes**
Expand Down
1 change: 1 addition & 0 deletions src/components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
/// <reference path="./toast/index.d.ts" />
/// <reference path="./tool_tip/index.d.ts" />
/// <reference path="./combo_box/index.d.ts" />
/// <reference path="./key_pad_menu/index.d.ts" />
25 changes: 25 additions & 0 deletions src/components/key_pad_menu/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/// <reference path="../common.d.ts" />

import { HTMLAttributes, MouseEventHandler, ReactNode, SFC } from 'react';

declare module '@elastic/eui' {

export const EuiKeyPadMenu: SFC<
CommonProps & HTMLAttributes<HTMLDivElement>
>;

interface EuiKeyPadMenuItemCommonProps {
label: ReactNode;
betaBadgeLabel?: string;
betaBadgeIconType?: IconType;
betaBadgeTooltipContent?: ReactNode;
}

export const EuiKeyPadMenuItemButton: SFC<
CommonProps & HTMLAttributes<HTMLButtonElement> & EuiKeyPadMenuItemCommonProps
>;

export const EuiKeyPadMenuItem: SFC<
CommonProps & HTMLAttributes<HTMLAnchorElement> & EuiKeyPadMenuItemCommonProps
>;
}

0 comments on commit 8287342

Please sign in to comment.