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

Conversation

justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Aug 5, 2018

Changes

Add typings for the EuiToolTip and EuiIconTip components.

Testing

Before changes:
screen shot 2018-08-05 at 12 52 11 pm

After adding types to my node_modules:
screen shot 2018-08-05 at 1 03 57 pm
screen shot 2018-08-05 at 1 03 22 pm

Reviewing this PR

import { ReactElement, ReactNode, SFC } from 'react';

declare module '@elastic/eui' {
export type PositionsToClassNameMap =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be named more explicitly against the icons, and doesn't have to reference that they're from the map: TooltipPositions. This aligns with the array "enum" that is used in the proptypes (POSITIONS vs positionsToClassNameMap)

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@justinkambic justinkambic merged commit bf0a6ce into elastic:master Aug 7, 2018
@justinkambic justinkambic deleted the euitooltip-typings branch August 7, 2018 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants