Files
paseo/packages/app/src/plugins/react-native/clipboard.web.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
360 B
TypeScript

// Expo's web fallback reports success even when document.execCommand returns
// false. Use the browser promise so the SDK can promise success or rejection.
export async function copyText(text: string): Promise<void> {
if (!navigator.clipboard) throw new Error("Clipboard copy is unavailable in this browser");
await navigator.clipboard.writeText(text);
}