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
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
## [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `9.8.0`.
- Converted `EuiTableHeaderMobile` to TS ([#1786](https://github.com/elastic/eui/pull/1786))

## [`9.8.0`](https://github.com/elastic/eui/tree/v9.8.0)

- **[Beta]** Added new `EuiSelectable` component ([#1699](https://github.com/elastic/eui/pull/1699))
- **[Beta]** Added new drag and drop components: `EuiDragDropContext`, `EuiDraggable`, and `EuiDroppable` ([#1733](https://github.com/elastic/eui/pull/1733))


## [`9.7.2`](https://github.com/elastic/eui/tree/v9.7.2)

- Converted `EuiFormErrorText` to TS ([#1772](https://github.com/elastic/eui/pull/1772))
Expand Down
1 change: 1 addition & 0 deletions src/components/table/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// <reference path="./table_pagination/index.d.ts" />
/// <reference path="./mobile/index.d.ts" />
import { CommonProps, NoArgCallback } from '../common';
import { IconType } from '../icon';
import { HorizontalAlignment } from '../../services/alignment';
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';
theodesp marked this conversation as resolved.
Show resolved Hide resolved
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 = classNames('euiTableHeaderMobile', className);

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