Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sqllab] Added share button to bottom menu (#4584)
* added sharebtn * address comments
- Loading branch information
1 parent
d522292
commit c6af488
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
superset/assets/javascripts/SqlLab/components/ShareQuery.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
|
||
import CopyToClipboard from '../../components/CopyToClipboard'; | ||
import CopyQueryTabUrl from './CopyQueryTabUrl'; | ||
import Button from '../../components/Button'; | ||
import { t } from '../../locales'; | ||
|
||
export default class ShareQueryBtn extends CopyQueryTabUrl { | ||
render() { | ||
return ( | ||
<CopyToClipboard | ||
copyNode={( | ||
<Button bsSize="small" className="toggleSave"> | ||
<i className="fa fa-clipboard" /> {t('Share Query')} | ||
</Button> | ||
)} | ||
tooltipText={t('copy URL to clipboard')} | ||
shouldShowText={false} | ||
getText={this.getUrl.bind(this)} | ||
/>); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters