InviteMemberForm
Invite-by-email form for the current (or specified) org. POSTs
/orgs/{orgId}/invitations — the server creates the invitation
row AND sends the invite email synchronously. On success the
created InvitationRecord is handed to onCreated so a parent
page can refresh its pending-invitations list.
Requires org:members:invite. The server’s 403 surfaces as an
inline error.
Usage
import { InviteMemberForm } from '@rw3iss/auth-client/preact/forms';
<InviteMemberForm onError={(err) => console.error(err)}/>Props
| Name | Type | Description |
|---|---|---|
client | AuthClient | |
orgId | string | Defaults to the active org id from the auth snapshot. |
defaultRoleIds | string[] | Pre-select role ids to assign on acceptance. |
onCreated | (invitation: InvitationRecord) => void | |
onError | (err: Error) => void | |
className | string |