-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EuiTableHeaderCellCheckbox
convert to TS
- Loading branch information
Theo
committed
May 29, 2019
1 parent
0d3c199
commit e89d4b2
Showing
6 changed files
with
37 additions
and
53 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
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
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
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
.../table/table_header_cell_checkbox.test.js → ...table/table_header_cell_checkbox.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
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,28 @@ | ||
import React, { FunctionComponent, TdHTMLAttributes } from 'react'; | ||
import classNames from 'classnames'; | ||
import { CommonProps } from '../common'; | ||
|
||
export type EuiTableHeaderCellCheckboxScope = | ||
| 'col' | ||
| 'row' | ||
| 'colgroup' | ||
| 'rowgroup'; | ||
|
||
export interface EuiTableHeaderCellCheckboxProps { | ||
width?: string; | ||
scope?: EuiTableHeaderCellCheckboxScope; | ||
} | ||
|
||
export const EuiTableHeaderCellCheckbox: FunctionComponent< | ||
CommonProps & | ||
TdHTMLAttributes<HTMLTableCellElement> & | ||
EuiTableHeaderCellCheckboxProps | ||
> = ({ children, className, ...rest }) => { | ||
const classes = classNames('euiTableHeaderCellCheckbox', className); | ||
|
||
return ( | ||
<th className={classes} {...rest}> | ||
<div className="euiTableCellContent">{children}</div> | ||
</th> | ||
); | ||
}; |