Files
paseo/packages/app/src/plugins/react-native/clipboard.ts
T
Mohamed Boudra 38c22139bb Let plugins control modal layout, scrolling and clipboard actions (#4392)
* feat(plugins): support modal body layout, scrolling and clipboard actions

* fix(app): keep native scroll dependencies out of web imports

* fix(nix): sync dependency hash for plugin native types

* test(plugins): express modal QA as user journeys
2026-09-06 13:48:29 +02:00

7 lines
266 B
TypeScript

export async function copyText(text: string): Promise<void> {
const { setStringAsync } = require("expo-clipboard") as typeof import("expo-clipboard");
if (!(await setStringAsync(text))) {
throw new Error("Clipboard copy was denied or is unavailable");
}
}