all files / src/SqlLab/components/ ShareQuery.jsx

100% Statements 9/9
100% Branches 0/0
100% Functions 1/1
100% Lines 8/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23                              
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)}
      />);
  }
}