-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EuiFormHelpText
converted to TS (#1852)
* `EuiFormHelpText` converted to TS * `EuiFormHelpText` updated Changelog
- Loading branch information
1 parent
6867a63
commit 9187f1f
Showing
8 changed files
with
21 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
9 changes: 3 additions & 6 deletions
9
...orm/form_help_text/form_help_text.test.js → ...rm/form_help_text/form_help_text.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { EuiFormHelpText } from './form_help_text'; |