You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
filepizza/client/components/Tempalink.js

21 lines
406 B
JavaScript

import React from 'react'
export default class Tempalink extends React.Component {
onClick() {
this.refs.input.getDOMNode().setSelectionRange(0, 9999)
}
render() {
var url = window.location.origin + '/d/' + this.props.token
return <input
className="tempalink"
onClick={this.onClick.bind(this)}
readOnly
ref="input"
type="text"
value={url} />
}
}