import React from 'react'; import PropTypes from 'prop-types'; import { Popover, OverlayTrigger } from 'react-bootstrap'; import CopyToClipboard from './../../components/CopyToClipboard'; import { t } from '../../locales'; const propTypes = { slice: PropTypes.object.isRequired, }; export default class EmbedCodeButton extends React.Component { constructor(props) { super(props); this.state = { height: '400', width: '600', }; this.handleInputChange = this.handleInputChange.bind(this); } handleInputChange(e) { const value = e.currentTarget.value; const name = e.currentTarget.name; const data = {}; data[name] = value; this.setState(data); } generateEmbedHTML() { const srcLink = ( window.location.origin + this.props.slice.data.standalone_endpoint + `&height=${this.state.height}` ); return ( '\n' + '' ); } renderPopover() { const html = this.generateEmbedHTML(); return (