mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-11 02:46:29 +00:00
* 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
7 lines
360 B
TypeScript
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);
|
|
}
|