Skip to content

Commit

Permalink
Converted EuiTableHeaderMobile to TS (#1786)
Browse files Browse the repository at this point in the history
* [Pagination] - Updated Changelog

* Code Review - Moved Changelog entry to current master

* [META] - Converted  to TS + tests

* Code review fixes

* [META] - Converted  to TS

* Updated Changelog

* EuiFormErrorText - Code review fixes

* Converted `EuiTableHeaderMobile` to TS + tests

* Updated Changelog

* Updated Changelog entry for EuiTableHeaderMobile

* EuiTableHeaderMobile: Code review fixes
  • Loading branch information
theodesp authored and chandlerprall committed Apr 4, 2019
1 parent 5973f54 commit fde22a8
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 32 deletions.
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';
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>
);
};

0 comments on commit fde22a8

Please sign in to comment.