Share dialog
People and teams with their role, general access, and the link's expiry, password and download.
import { ShareDialog, SharePanel, DEFAULT_SHARE } from "@forgeron/ui";1 person added, Editor by default
1 people · link
API → Props
| Prop | Type | Default | Description |
|---|---|---|---|
directory | { id, name, hint? }[] | — | Who can be added: a combobox with arrows and Enter. |
value / defaultValue / onChange | { people, general, generalRole, link: { expires, password, download } } | DEFAULT_SHARE | The settings; general is restricted, organization or link. |
roles / defaultRole | { value, label }[]; string | viewer, commenter, editor; the last | The roles, least first. |
inherited | { person, role, from? }[] | — | Fixed rows: the owner, the access from a parent folder. |
organization / allowLink | string; boolean | — | Offers “Anyone at …”; and “Anyone with the link” (true by default). |
linkUrl / onCopyLink / expiryOptions / onPasswordChange | string; () => void; option[]; (password) => void | — | The link's settings, shown when anyone with the link can open it. |
itemName / onClose / onDone / description | string; () => void; (settings) => void; ReactNode | — | ShareDialog only: the modal around SharePanel, Copy link and Done. |
className | string | — | Extra classes. |