mirror of
https://github.com/apache/superset.git
synced 2026-05-09 18:05:52 +00:00
refactor: icon to icons for controls (#15568)
* initial commit * Update DateFilterLabel.tsx
This commit is contained in:
committed by
GitHub
parent
026eefdb36
commit
2be52c0659
@@ -22,7 +22,6 @@ import { t, styled, supersetTheme } from '@superset-ui/core';
|
||||
|
||||
import { Dropdown, Menu } from 'src/common/components';
|
||||
import { Tooltip } from 'src/components/Tooltip';
|
||||
import Icon from 'src/components/Icon';
|
||||
import Icons from 'src/components/Icons';
|
||||
import ChangeDatasourceModal from 'src/datasource/ChangeDatasourceModal';
|
||||
import DatasourceModal from 'src/datasource/DatasourceModal';
|
||||
@@ -93,6 +92,12 @@ const Styles = styled.div`
|
||||
margin-right: ${({ theme }) => 2 * theme.gridUnit}px;
|
||||
flex: none;
|
||||
}
|
||||
span[aria-label='dataset-physical'] {
|
||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
||||
}
|
||||
span[aria-label='more-horiz'] {
|
||||
color: ${({ theme }) => theme.colors.primary.base};
|
||||
}
|
||||
`;
|
||||
|
||||
const CHANGE_DATASET = 'change_dataset';
|
||||
@@ -190,7 +195,7 @@ class DatasourceControl extends React.PureComponent {
|
||||
return (
|
||||
<Styles data-test="datasource-control" className="DatasourceControl">
|
||||
<div className="data-container">
|
||||
<Icon name="dataset-physical" className="dataset-svg" />
|
||||
<Icons.DatasetPhysical className="dataset-svg" />
|
||||
{/* Add a tooltip only for long dataset names */}
|
||||
{!isMissingDatasource && datasource.name.length > 25 ? (
|
||||
<Tooltip title={datasource.name}>
|
||||
@@ -218,10 +223,9 @@ class DatasourceControl extends React.PureComponent {
|
||||
data-test="datasource-menu"
|
||||
>
|
||||
<Tooltip title={t('More dataset related options')}>
|
||||
<Icon
|
||||
<Icons.MoreHoriz
|
||||
className="datasource-modal-trigger"
|
||||
data-test="datasource-menu-trigger"
|
||||
name="more-horiz"
|
||||
/>
|
||||
</Tooltip>
|
||||
</Dropdown>
|
||||
|
||||
Reference in New Issue
Block a user