summaryrefslogtreecommitdiff
path: root/app_expo/components/screen/screen.presets.ts
diff options
context:
space:
mode:
authorKirill Rogovoy <[email protected]>2021-07-23 11:02:26 +0300
committerKirill Rogovoy <[email protected]>2021-07-23 11:02:26 +0300
commit73308af061af5e17ac7d4a73fa027a2f303c70dd (patch)
tree816fb8231e13f58f7afe822742513b3150cdc871 /app_expo/components/screen/screen.presets.ts
parentb8c58914cc1e251ce161905340647b6824d0a7c4 (diff)
Update graph data when Emacs node changes + minor improvements
Diffstat (limited to 'app_expo/components/screen/screen.presets.ts')
-rw-r--r--app_expo/components/screen/screen.presets.ts66
1 files changed, 0 insertions, 66 deletions
diff --git a/app_expo/components/screen/screen.presets.ts b/app_expo/components/screen/screen.presets.ts
deleted file mode 100644
index aa8d8cf..0000000
--- a/app_expo/components/screen/screen.presets.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import { ViewStyle } from 'react-native'
-import { color } from '../../theme'
-
-/**
- * All screen keyboard offsets.
- */
-export const offsets = {
- none: 0,
-}
-
-/**
- * The variations of keyboard offsets.
- */
-export type KeyboardOffsets = keyof typeof offsets
-
-/**
- * All the variations of screens.
- */
-export const presets = {
- /**
- * No scrolling. Suitable for full-screen carousels and components
- * which have built-in scrolling like FlatList.
- */
- fixed: {
- outer: {
- backgroundColor: color.background,
- flex: 1,
- height: '100%',
- } as ViewStyle,
- inner: {
- justifyContent: 'flex-start',
- alignItems: 'stretch',
- height: '100%',
- width: '100%',
- } as ViewStyle,
- },
-
- /**
- * Scrolls. Suitable for forms or other things requiring a keyboard.
- *
- * Pick this one if you don't know which one you want yet.
- */
- scroll: {
- outer: {
- backgroundColor: color.background,
- flex: 1,
- height: '100%',
- } as ViewStyle,
- inner: { justifyContent: 'flex-start', alignItems: 'stretch' } as ViewStyle,
- },
-}
-
-/**
- * The variations of screens.
- */
-export type ScreenPresets = keyof typeof presets
-
-/**
- * Is this preset a non-scrolling one?
- *
- * @param preset The preset to check
- */
-export function isNonScrolling(preset?: ScreenPresets) {
- // any of these things will make you scroll
- return !preset || !presets[preset] || preset === 'fixed'
-}