diff --git a/changelogs/upcoming/7621.md b/changelogs/upcoming/7621.md new file mode 100644 index 00000000000..548a7ad74dc --- /dev/null +++ b/changelogs/upcoming/7621.md @@ -0,0 +1,3 @@ +**Breaking changes** + +- Removed unused `EuiTableHeaderButton` component diff --git a/src/components/table/__snapshots__/table_header_button.test.tsx.snap b/src/components/table/__snapshots__/table_header_button.test.tsx.snap deleted file mode 100644 index 4233eccc4b4..00000000000 --- a/src/components/table/__snapshots__/table_header_button.test.tsx.snap +++ /dev/null @@ -1,12 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`EuiTableHeaderButton is rendered 1`] = ` - -`; diff --git a/src/components/table/index.ts b/src/components/table/index.ts index 6946313be67..2492b31fc61 100644 --- a/src/components/table/index.ts +++ b/src/components/table/index.ts @@ -15,8 +15,6 @@ export type { EuiTableFooterCellProps } from './table_footer_cell'; export { EuiTableFooterCell } from './table_footer_cell'; export type { EuiTableHeaderProps } from './table_header'; export { EuiTableHeader } from './table_header'; -export type { EuiTableHeaderButtonProps } from './table_header_button'; -export { EuiTableHeaderButton } from './table_header_button'; export type { EuiTableHeaderCellProps } from './table_header_cell'; export { EuiTableHeaderCell } from './table_header_cell'; export type { EuiTableHeaderCellCheckboxProps } from './table_header_cell_checkbox'; diff --git a/src/components/table/table_header_button.test.tsx b/src/components/table/table_header_button.test.tsx deleted file mode 100644 index 0edd06ab3b8..00000000000 --- a/src/components/table/table_header_button.test.tsx +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React from 'react'; -import { requiredProps } from '../../test/required_props'; -import { render } from '../../test/rtl'; - -import { EuiTableHeaderButton } from './table_header_button'; - -describe('EuiTableHeaderButton', () => { - test('is rendered', () => { - const { container } = render(); - - expect(container.firstChild).toMatchSnapshot(); - }); -}); diff --git a/src/components/table/table_header_button.tsx b/src/components/table/table_header_button.tsx deleted file mode 100644 index 4bcc4208a84..00000000000 --- a/src/components/table/table_header_button.tsx +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React, { ButtonHTMLAttributes, FunctionComponent } from 'react'; -import classNames from 'classnames'; -import { CommonProps } from '../common'; -import { EuiInnerText } from '../inner_text'; - -import { IconType, EuiIcon } from '../icon'; - -export type EuiTableHeaderButtonProps = CommonProps & - ButtonHTMLAttributes & { - iconType?: IconType; - }; - -export const EuiTableHeaderButton: FunctionComponent< - EuiTableHeaderButtonProps -> = ({ children, className, iconType, ...rest }) => { - const classes = classNames('euiTableHeaderButton', className); - - // Add an icon to the button if one exists. - let buttonIcon; - - if (iconType) { - buttonIcon = ( -