Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: change warning icon to use icons #14462

Closed
wants to merge 3 commits into from
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} />
pkdotson marked this conversation as resolved.
Show resolved Hide resolved
{t('Add dataset')}
</>
}
>
<TableSelectorContainer>
<TableSelector
Expand Down