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

Converted EuiTableHeaderMobile to TS #1786

Merged
merged 13 commits into from
Apr 4, 2019
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Converted `EuiTableHeaderMobile` to TS ([#1786](https://github.com/elastic/eui/pull/1786))
- Converted `EuiFormErrorText` to TS ([#1772](https://github.com/elastic/eui/pull/1772))

**Bug fixes**
Expand Down
1 change: 1 addition & 0 deletions src/components/table/mobile/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { EuiTableHeaderMobile } from './table_header_mobile';
25 changes: 0 additions & 25 deletions src/components/table/mobile/table_header_mobile.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ import { EuiTableHeaderMobile } from './table_header_mobile';

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

expect(component)
.toMatchSnapshot();
expect(component).toMatchSnapshot();
});
});
15 changes: 15 additions & 0 deletions src/components/table/mobile/table_header_mobile.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React, { FunctionComponent, HTMLAttributes } from 'react';
import classNames from 'classnames';
import { CommonProps } from '../../common';

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

return (
<div className={classes} {...rest}>
{children}
</div>
);
};