Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions superset-frontend/src/views/CRUD/data/dataset/AddDatasetModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
* under the License.
*/
import React, { FunctionComponent, useState } from 'react';
import { styled, t } from '@superset-ui/core';
import { styled, t, useTheme } from '@superset-ui/core';
import { useSingleViewResource } from 'src/views/CRUD/hooks';
import { isEmpty, isNil } from 'lodash';
import Icons from 'src/components/Icons';
import Modal from 'src/components/Modal';
import TableSelector from 'src/components/TableSelector';
import withToasts from 'src/messageToasts/enhancers/withToasts';
Expand All @@ -38,6 +39,10 @@ interface DatasetModalProps {
show: boolean;
}

const StyledIcon = styled(Icons.WarningSolid)`
margin: auto ${({ theme }) => theme.gridUnit * 2}px auto 0;
`;

const TableSelectorContainer = styled.div`
padding-bottom: 340px;
width: 65%;
Expand All @@ -60,6 +65,8 @@ const DatasetModal: FunctionComponent<DatasetModalProps> = ({
addDangerToast,
);

const theme = useTheme();

const onChange = ({
dbId,
schema,
Expand Down Expand Up @@ -100,7 +107,12 @@ const DatasetModal: FunctionComponent<DatasetModalProps> = ({
onHide={onHide}
primaryButtonName={t('Add')}
show={show}
title={t('Add dataset')}
title={
<>
<StyledIcon iconColor={theme.colors.grayscale.base} />
{t('Add dataset')}
</>
}
>
<TableSelectorContainer>
<TableSelector
Expand Down