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

EuiFormHelpText converted to TS #1852

Merged
merged 2 commits into from
Apr 18, 2019
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 @@ -2,6 +2,7 @@

- Use `cache-loader` to speed up development docs site build ([#1841](https://github.com/elastic/eui/pull/1841)
- Converted `matching_options` to TS ([#1828](https://github.com/elastic/eui/pull/1828))
- Converted `EuiFormHelpText` to TS ([#1852](https://github.com/elastic/eui/pull/1852))

**Bug fixes**

Expand Down
21 changes: 0 additions & 21 deletions src/components/form/form_help_text/form_help_text.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import React from 'react';
import { render } from 'enzyme';
import { requiredProps } from '../../../test/required_props';
import { requiredProps } from '../../../test';

import { EuiFormHelpText } from './form_help_text';

describe('EuiFormHelpText', () => {
test('is rendered', () => {
const component = render(
<EuiFormHelpText {...requiredProps}>
This is help text.
</EuiFormHelpText>
<EuiFormHelpText {...requiredProps}>This is help text.</EuiFormHelpText>
);

expect(component)
.toMatchSnapshot();
expect(component).toMatchSnapshot();
});
});
16 changes: 16 additions & 0 deletions src/components/form/form_help_text/form_help_text.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React, { FunctionComponent, HTMLAttributes } from 'react';

import classNames from 'classnames';
import { CommonProps } from '../../common';

export const EuiFormHelpText: FunctionComponent<
CommonProps & HTMLAttributes<HTMLDivElement>
> = ({ children, className, ...rest }) => {
const classes = classNames('euiFormHelpText', className);

return (
<div className={classes} {...rest}>
{children}
</div>
);
};
17 changes: 0 additions & 17 deletions src/components/form/form_help_text/index.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/form/form_help_text/index.js

This file was deleted.

1 change: 1 addition & 0 deletions src/components/form/form_help_text/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { EuiFormHelpText } from './form_help_text';