UIViews
ShareLink
Share text or a URL with the share sheet.
A button that opens the system share sheet. Without children, it shows the standard localized Share button.
import { ShareLink } from "onescript/views"
<ShareLink
item={new URL("https://onescript.define.to")}
subject="OneScript"
message="Write TypeScript, run native SwiftUI."
/>| Prop | Type | Description |
|---|---|---|
item | string | URL | The text or URL to share. |
subject | string | Title used by destinations that support one, such as Mail. |
message | string | Note shared along with the item. |
children | ViewChild | Optional custom label. |
import { Label, ShareLink } from "onescript/views"
<ShareLink item={quote}>
<Label symbol="quote.bubble">Share a quote</Label>
</ShareLink>Also accepts Modifiers. It is only available in App and Action view sessions; widgets reject it with an unsupported view type error.
How is this guide?
Last updated on