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 typescript definitions for <EuiHealth> #403

Merged
merged 2 commits into from
Feb 14, 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
Expand Up @@ -10,6 +10,7 @@
- Add styles for `readOnly` states of form controls. ([#391](https://github.com/elastic/eui/pull/391))
- Added importAction and exportAction icons ([#394](https://github.com/elastic/eui/pull/394))
- Added `EuiCard` for UI patterns that need an icon/image, title and description with some sort of action. ([#380](https://github.com/elastic/eui/pull/380))
- Add TypeScript definitions for the `<EuiHealth>` component. ([#403](https://github.com/elastic/eui/pull/403))

**Bug fixes**

Expand Down
18 changes: 18 additions & 0 deletions src/components/health/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/// <reference path="../icon/index.d.ts" />

import { SFC, HTMLAttributes } from 'react';

declare module '@elastic/eui' {
/**
* health type defs
*
* @see './health.js'
*/

type EuiHealthProps = CommonProps &
HTMLAttributes<HTMLDivElement> & {
color: IconColor;
};

export const EuiHealth: SFC<EuiHealthProps>;
}
1 change: 1 addition & 0 deletions src/components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/// <reference path="./button/index.d.ts" />
/// <reference path="./context_menu/index.d.ts" />
/// <reference path="./flex/index.d.ts" />
/// <reference path="./health/index.d.ts" />
/// <reference path="./icon/index.d.ts" />
/// <reference path="./panel/index.d.ts" />
/// <reference path="./popover/index.d.ts" />
Expand Down