ShareDialog
Sharing one published page (a form, a course, a worksheet), as Google Forms' Send step: its link with Copy, a QR code (and a printable poster when the host has one), an `<iframe>` to embed it on a website, and a builder for prefilled links (`?location=…&staff=…`, or whatever the host offers). Generic: the host passes the link, how to draw a QR code, and the prefill choices.
packages/ui/src/components/resource/ShareDialog.tsx
@marktiderman/genesis-uiimport { ShareDialog } from "@marktiderman/genesis-ui";react-docgen-typescript.ShareDialog
Sharing one published page (a form, a course, a worksheet), as Google Forms' Send step: its link with Copy, a QR code (and a printable poster when the host has one), an `<iframe>` to embed it on a website, and a builder for prefilled links (`?location=…&staff=…`, or whatever the host offers). Generic: the host passes the link, how to draw a QR code, and the prefill choices.
| Prop | Type | Default | Description |
|---|---|---|---|
| name* | string | — | Its name, for the embed's accessible title. |
| onOpenChange* | (open: boolean) => void | — | |
| open* | boolean | — | |
| url* | string | null | — | The public link; null while it is still loading. |
| defaultTab | enum | link | The tab it opens on (each time it opens). Default "link". |
| description | ReactNode | Anyone with the link can open it. | Default "Anyone with the link can open it." |
| noun | string | page | What it is, in the default title and buttons: "page" (default), "form", "course". |
| posterUrl | ((url: string, prefill: Record<string, string>) => string | null) | — | A printable poster for a link (the base link, or a prefilled one), when the host has one. |
| prefill | readonly PrefillChoice[] | [] | The search params a prefilled link may set, each with its choices. None hides the builder. |
| prefillNote | ReactNode | — | Said under the prefilled-link builder (what a prefilled link does). |
| renderQr | ((url: string) => ReactNode) | — | Draws a QR code for a link. |
| title | string | `Share your ${noun}` | Default "Share your {noun}". |