2019-06-21 16:39:20 +00:00
|
|
|
import * as WebBrowser from 'expo-web-browser';
|
|
|
|
|
2019-12-11 23:01:12 +00:00
|
|
|
import { themes } from '../constants/colors';
|
2019-06-21 16:39:20 +00:00
|
|
|
|
2019-12-11 23:01:12 +00:00
|
|
|
const openLink = (url, theme = 'light') => WebBrowser.openBrowserAsync(url, {
|
|
|
|
toolbarColor: themes[theme].headerBackground,
|
|
|
|
controlsColor: themes[theme].headerTintColor,
|
2019-06-21 16:39:20 +00:00
|
|
|
collapseToolbar: true,
|
|
|
|
showTitle: true
|
|
|
|
});
|
|
|
|
|
|
|
|
export default openLink;
|