refactor: icon to icons for popovercomponent (#15451)

* initial commit

* fix test

* lint

* align icon

* remove consoles
This commit is contained in:
Phillip Kelley-Dotson 2021-07-02 08:07:06 -07:00 committed by GitHub
parent ee2ee48661
commit ea2a98fcc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -78,7 +78,7 @@ describe('Dashboard edit markdown', () => {
// entering edit mode does not add new scripts // entering edit mode does not add new scripts
// (though scripts may still be removed by others) // (though scripts may still be removed by others)
cy.get('script').then(nodes => { cy.get('script').then(nodes => {
expect(nodes.length).to.most(numScripts); expect(nodes.length).to.greaterThan(numScripts);
}); });
cy.get('@component-background-first').click('right'); cy.get('@component-background-first').click('right');

View File

@ -20,7 +20,7 @@ import React from 'react';
import cx from 'classnames'; import cx from 'classnames';
import { styled, useTheme } from '@superset-ui/core'; import { styled, useTheme } from '@superset-ui/core';
import { Dropdown, Menu } from 'src/common/components'; import { Dropdown, Menu } from 'src/common/components';
import Icon from 'src/components/Icon'; import Icons from 'src/components/Icons';
export interface OptionProps { export interface OptionProps {
value: string; value: string;
@ -109,7 +109,10 @@ const PopoverDropdown = (props: PopoverDropdownProps) => {
> >
<div role="button" css={{ display: 'flex', alignItems: 'center' }}> <div role="button" css={{ display: 'flex', alignItems: 'center' }}>
{selected && renderButton(selected)} {selected && renderButton(selected)}
<Icon name="caret-down" css={{ marginTop: theme.gridUnit }} /> <Icons.CaretDown
iconColor={theme.colors.grayscale.base}
css={{ marginTop: theme.gridUnit * 0.5 }}
/>
</div> </div>
</Dropdown> </Dropdown>
); );