one
Version:
One is a React framework for web, iOS, and Android apps.
26 lines (24 loc) • 550 B
JavaScript
function openURL(url) {
window.open(url, "_blank", "noopener");
return Promise.resolve();
}
function openShare({ title, message, url }) {
if (!navigator.share) {
return Promise.reject(new Error("openShare: this browser has no share sheet"));
}
return navigator.share({
title,
text: message,
url
});
}
function openSettings() {
return Promise.reject(new Error("openSettings: the web has no app settings page"));
}
const Open = Object.freeze({
openURL,
openShare,
openSettings
});
export { Open };
//# sourceMappingURL=index.mjs.map