From d8a15e60b993c058a01ea5caa1c7e39dfc3b942a Mon Sep 17 00:00:00 2001 From: Phillip Kelley-Dotson Date: Mon, 12 Jul 2021 10:24:16 -0700 Subject: [PATCH] refactor: icon to icons for sqllab (#15593) * initial commit * rid of theme * Update superset-frontend/src/SqlLab/components/ShareSqlLabQuery.tsx Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com> * Update superset-frontend/src/SqlLab/components/ShareSqlLabQuery.tsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> * Update superset-frontend/src/SqlLab/components/ShareSqlLabQuery.tsx Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com> Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> --- .../components/RunQueryActionButton.tsx | 10 +++++--- .../src/SqlLab/components/SaveQuery.tsx | 21 ++++++++-------- .../SqlLab/components/ShareSqlLabQuery.tsx | 24 ++++++++++++------- 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx b/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx index 9d22ce5b7c..0769043862 100644 --- a/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx +++ b/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx @@ -21,7 +21,7 @@ import { t, styled, supersetTheme } from '@superset-ui/core'; import { Menu } from 'src/common/components'; import Button, { ButtonProps } from 'src/components/Button'; -import Icon from 'src/components/Icon'; +import Icons from 'src/components/Icons'; import { DropdownButton, DropdownButtonProps, @@ -77,6 +77,10 @@ const StyledButton = styled.span` &:last-of-type { margin-right: ${({ theme }) => theme.gridUnit * 2}px; } + span[name='caret-down'] { + display: flex; + margin-right: ${({ theme }) => theme.gridUnit * -2}px; + } } `; @@ -116,8 +120,8 @@ const RunQueryActionButton = ({ ? { overlay: overlayCreateAsMenu, icon: ( - theme.colors.grayscale.base}; + svg { + vertical-align: -${({ theme }) => theme.gridUnit * 1.25}px; + margin: 0; + } } `; @@ -150,12 +156,7 @@ export default function SaveQuery({ return ( void; } +const StyledIcon = styled(Icons.Link)` + &:first-of-type { + margin: 0; + display: flex; + svg { + margin: 0; + } + } +`; + function ShareSqlLabQuery({ queryEditor, addDangerToast, @@ -86,14 +96,12 @@ function ShareSqlLabQuery({ : t('Save the query to enable this feature'); return ( );