refactor: Replace react-bootstrap tabs with Antd tabs (#11118)

* Replace tabs in BuilderComponentPane

* Replace tabs in ControlPanelsContainer

* Replace tabs in AdhocMetricEditPopover

* Replace Tabs in DatasourceEditor

* Replace tabs in AdhocFilterEditPopover

* Replace tabs in DateFilterControl

* Bug fix

* Change Tab styles

* Fix tests

* Fix cypress tests

* Lint fix

* Fix tests

* Change Tabs style in ControlPanelsContainer

* Change tabs content height

* Lint fix

* Add data test

* Fix e2e test

* Move Tabs file to separate dir

* Fix after rebase

* Fix e2e tests

* Fix after rebase
This commit is contained in:
Kamil Gabryjelski
2020-10-31 06:05:31 +01:00
committed by GitHub
parent 01ddbd0697
commit 55a3404b71
15 changed files with 188 additions and 140 deletions

View File

@@ -19,7 +19,7 @@
/* eslint-env browser */
import PropTypes from 'prop-types';
import React from 'react';
import { Tabs, Tab } from 'react-bootstrap';
import Tabs from 'src/common/components/Tabs';
import { StickyContainer, Sticky } from 'react-sticky';
import { ParentSize } from '@vx/responsive';
@@ -48,23 +48,24 @@ class BuilderComponentPane extends React.PureComponent {
const { isSticky } = this.props;
return (
<Tabs
className="m-t-10 tabs-components"
id="tabs"
className="tabs-components"
style={{ marginTop: '10px' }}
data-test="dashboard-builder-component-pane-tabs-navigation"
>
<Tab eventKey={1} title={t('Components')}>
<Tabs.TabPane key={1} tab={t('Components')}>
<NewTabs />
<NewRow />
<NewColumn />
<NewHeader />
<NewMarkdown />
<NewDivider />
</Tab>
<Tab eventKey={2} title={t('Charts')} className="tab-charts">
</Tabs.TabPane>
<Tabs.TabPane key={2} tab={t('Charts')} className="tab-charts">
<SliceAdder
height={height + (isSticky ? SUPERSET_HEADER_HEIGHT : 0)}
/>
</Tab>
</Tabs.TabPane>
</Tabs>
);
}