mirror of
https://github.com/apache/superset.git
synced 2026-04-28 04:25:07 +00:00
Migrates Collapse component from Bootstrap to AntD (#12920)
This commit is contained in:
committed by
GitHub
parent
e4a0233181
commit
9a05d6afe5
@@ -19,7 +19,8 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Button from 'src/components/Button';
|
||||
import { t, styled } from '@superset-ui/core';
|
||||
import { t, styled, css } from '@superset-ui/core';
|
||||
import Collapse from 'src/common/components/Collapse';
|
||||
import TableElement from './TableElement';
|
||||
import TableSelector from '../../components/TableSelector';
|
||||
|
||||
@@ -145,13 +146,38 @@ export default class SqlEditorLeftBar extends React.PureComponent {
|
||||
<div className="divider" />
|
||||
<StyledScrollbarContainer>
|
||||
<StyledScrollbarContent contentHeight={tableMetaDataHeight}>
|
||||
{this.props.tables.map(table => (
|
||||
<TableElement
|
||||
table={table}
|
||||
key={table.id}
|
||||
actions={this.props.actions}
|
||||
/>
|
||||
))}
|
||||
<Collapse
|
||||
ghost
|
||||
expandIconPosition="right"
|
||||
css={theme => css`
|
||||
.ant-collapse-item {
|
||||
margin-bottom: ${theme.gridUnit * 3}px;
|
||||
}
|
||||
.ant-collapse-header {
|
||||
padding: 0px !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.ant-collapse-content-box {
|
||||
padding: 0px ${theme.gridUnit * 4}px 0px 0px !important;
|
||||
}
|
||||
.ant-collapse-arrow {
|
||||
top: ${theme.gridUnit * 2}px !important;
|
||||
color: ${theme.colors.primary.dark1} !important;
|
||||
&: hover {
|
||||
color: ${theme.colors.primary.dark2} !important;
|
||||
}
|
||||
}
|
||||
`}
|
||||
>
|
||||
{this.props.tables.map(table => (
|
||||
<TableElement
|
||||
table={table}
|
||||
key={table.id}
|
||||
actions={this.props.actions}
|
||||
/>
|
||||
))}
|
||||
</Collapse>
|
||||
</StyledScrollbarContent>
|
||||
</StyledScrollbarContainer>
|
||||
{shouldShowReset && (
|
||||
|
||||
Reference in New Issue
Block a user