diff options
Diffstat (limited to 'src/alf/util/platform.ts')
-rw-r--r-- | src/alf/util/platform.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/alf/util/platform.ts b/src/alf/util/platform.ts new file mode 100644 index 000000000..544f5480b --- /dev/null +++ b/src/alf/util/platform.ts @@ -0,0 +1,25 @@ +import {Platform} from 'react-native' + +export function web(value: any) { + return Platform.select({ + web: value, + }) +} + +export function ios(value: any) { + return Platform.select({ + ios: value, + }) +} + +export function android(value: any) { + return Platform.select({ + android: value, + }) +} + +export function native(value: any) { + return Platform.select({ + native: value, + }) +} |