Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typings for EuiToolTip and EuiIconTip #1087

Merged
merged 4 commits into from
Aug 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 typings for `EuiToolTip` and `EuiIconTip` ([#1087](https://github.com/elastic/eui/pull/1087))
- Added `spacesApp` logo to `EuiIcon` set ([#1065](https://github.com/elastic/eui/pull/1065))
- Added `!default` to border SASS props ([#1079](https://github.com/elastic/eui/pull/1079))

Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tool_tip/tool_tip_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const ToolTipExample = {
The <EuiCode>position</EuiCode> prop will take a suggested position, but will
change it if the tool tip gets too close to the edge of the screen. You can use
the <EuiCode>clickOnly</EuiCode> prop to tell the too tip to only appear on click
wrather than on hover.
rather than on hover.
</EuiText>

<EuiSpacer size="l" />
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 @@ -26,3 +26,4 @@
/// <reference path="./call_out/index.d.ts" />
/// <reference path="./badge/index.d.ts" />
/// <reference path="./toast/index.d.ts" />
/// <reference path="./tool_tip/index.d.ts" />
27 changes: 27 additions & 0 deletions src/components/tool_tip/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ReactElement, ReactNode, SFC } from 'react';

declare module '@elastic/eui' {
export type ToolTipPositions =
| 'top'
| 'right'
| 'bottom'
| 'left';

export interface EuiToolTipProps {
children: ReactElement<any>;
className?: string;
content: ReactNode;
title?: ReactNode;
id?: string;
position?: ToolTipPositions;
}
export const EuiToolTip: SFC<EuiToolTipProps>;

export interface EuiIconTipProps {
color?: string;
type?: string;
size?: string;
'aria-label'?: string;
}
export const EuiIconTip: SFC<EuiIconTipProps>;
}