Skip to content

Add typings for EuiToolTip and EuiIconTip#1087

Merged
justinkambic merged 4 commits into
elastic:masterfrom
justinkambic:euitooltip-typings
Aug 7, 2018
Merged

Add typings for EuiToolTip and EuiIconTip#1087
justinkambic merged 4 commits into
elastic:masterfrom
justinkambic:euitooltip-typings

Conversation

@justinkambic
Copy link
Copy Markdown
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

Comment thread src/components/tool_tip/index.d.ts Outdated
import { ReactElement, ReactNode, SFC } from 'react';

declare module '@elastic/eui' {
export type PositionsToClassNameMap =
Copy link
Copy Markdown
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
Copy Markdown
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