diff --git a/public/app/features/users/InviteeRow.tsx b/public/app/features/users/InviteeRow.tsx new file mode 100644 index 00000000000..d75ffb790f3 --- /dev/null +++ b/public/app/features/users/InviteeRow.tsx @@ -0,0 +1,57 @@ +import React, { createRef, PureComponent } from 'react'; +import { connect } from 'react-redux'; +import { Invitee } from 'app/types'; +import { revokeInvite } from './state/actions'; + +export interface Props { + invitee: Invitee; + revokeInvite: typeof revokeInvite; +} + +class InviteeRow extends PureComponent { + private copyUrlRef = createRef(); + + copyToClipboard = () => { + const node = this.copyUrlRef.current; + + if (node) { + node.select(); + document.execCommand('copy'); + } + }; + + render() { + const { invitee, revokeInvite } = this.props; + return ( + + {invitee.email} + {invitee.name} + +