mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
* Migrate UsersActionBar * Invites table * Migrate Users page * Select version of OrgPicker * OrgRolePicker to use Select only * Fix modal issue * Move legacy Switch * Move from Forms folder * Fix failing test * Merge and fix issues * Update OrgRole issues * OrgUser type * Remove unused import * Update Snapshot
40 lines
1008 B
TypeScript
40 lines
1008 B
TypeScript
import React, { PureComponent } from 'react';
|
|
import { connect } from 'react-redux';
|
|
import { Invitee } from 'app/types';
|
|
import { revokeInvite } from './state/actions';
|
|
import { Button, ClipboardButton } from '@grafana/ui';
|
|
|
|
export interface Props {
|
|
invitee: Invitee;
|
|
revokeInvite: typeof revokeInvite;
|
|
}
|
|
|
|
class InviteeRow extends PureComponent<Props> {
|
|
render() {
|
|
const { invitee, revokeInvite } = this.props;
|
|
return (
|
|
<tr>
|
|
<td>{invitee.email}</td>
|
|
<td>{invitee.name}</td>
|
|
<td className="text-right">
|
|
<ClipboardButton variant="secondary" size="sm" getText={() => invitee.url}>
|
|
Copy Invite
|
|
</ClipboardButton>
|
|
|
|
</td>
|
|
<td>
|
|
<Button variant="destructive" size="sm" icon="times" onClick={() => revokeInvite(invitee.code)} />
|
|
</td>
|
|
</tr>
|
|
);
|
|
}
|
|
}
|
|
|
|
const mapDispatchToProps = {
|
|
revokeInvite,
|
|
};
|
|
|
|
export default connect(() => {
|
|
return {};
|
|
}, mapDispatchToProps)(InviteeRow);
|