michael-s-molina commented on a change in pull request #13996:
URL: https://github.com/apache/superset/pull/13996#discussion_r612458525
##########
File path: superset-frontend/src/SqlLab/components/ShareSqlLabQuery.tsx
##########
@@ -94,58 +78,43 @@ function ShareSqlLabQuery({
return getCopyUrlForSavedQuery(callback);
};
- const buildButton = () => {
- const canShare =
- queryEditor.remoteId ||
- isFeatureEnabled(FeatureFlag.SHARE_QUERIES_VIA_KV_STORE);
+ const buildButton = (canShare: boolean) => {
+ const tooltip = canShare
+ ? t('Copy query link to your clipboard')
+ : t('Save the query to enable this feature');
return (
- <Styles>
- <Button buttonSize="small" className={cx(!canShare && 'btn-disabled')}>
- <Icon
- name="link"
- color={
- canShare
- ? supersetTheme.colors.primary.base
- : supersetTheme.colors.grayscale.base
- }
- width={20}
- height={20}
- />{' '}
- {t('Copy link')}
- </Button>
- </Styles>
+ <Button buttonSize="small" tooltip={tooltip} disabled={!canShare}>
+ <Icon
+ name="link"
+ color={
+ canShare
+ ? supersetTheme.colors.primary.base
Review comment:
Fixed and I agree with eslint rule 😉
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]