about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-07-18 15:18:56 -0500
committerEric Bailey <git@esb.lol>2023-07-18 15:18:56 -0500
commit1ca5792165fc690541ada3a74b42f4e64ff84da7 (patch)
treebf7c54b64330426d4c3ff67f9c796f58924cedbf
parent17deaaa7e71f33f82383182b47a076b8ba1a75fc (diff)
downloadvoidsky-1ca5792165fc690541ada3a74b42f4e64ff84da7.tar.zst
create explicit relationship between values
-rw-r--r--src/view/shell/Composer.web.tsx5
-rw-r--r--src/view/shell/bottom-bar/BottomBarStyles.tsx3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/view/shell/Composer.web.tsx b/src/view/shell/Composer.web.tsx
index 9b0033fe6..d1a84c8d0 100644
--- a/src/view/shell/Composer.web.tsx
+++ b/src/view/shell/Composer.web.tsx
@@ -5,6 +5,7 @@ import {ComposePost} from '../com/composer/Composer'
 import {ComposerOpts} from 'state/models/ui/shell'
 import {usePalette} from 'lib/hooks/usePalette'
 import {isMobileWeb} from 'platform/detection'
+import {BOTTOM_BAR_HEIGHT} from 'view/shell/bottom-bar/BottomBarStyles'
 
 export const Composer = observer(
   ({
@@ -62,8 +63,8 @@ const styles = StyleSheet.create({
     paddingVertical: 0,
     paddingHorizontal: 2,
     borderRadius: isMobileWeb ? 0 : 8,
-    marginBottom: isMobileWeb ? '61px' : 0,
+    marginBottom: isMobileWeb ? BOTTOM_BAR_HEIGHT : 0,
     borderWidth: 1,
-    maxHeight: isMobileWeb ? 'calc(100% - 61px)' : 'calc(100% - (40px * 2))',
+    maxHeight: isMobileWeb ? `calc(100% - ${BOTTOM_BAR_HEIGHT}px)` : 'calc(100% - (40px * 2))',
   },
 })
diff --git a/src/view/shell/bottom-bar/BottomBarStyles.tsx b/src/view/shell/bottom-bar/BottomBarStyles.tsx
index f31ab44cf..91d285e47 100644
--- a/src/view/shell/bottom-bar/BottomBarStyles.tsx
+++ b/src/view/shell/bottom-bar/BottomBarStyles.tsx
@@ -1,8 +1,11 @@
 import {StyleSheet} from 'react-native'
 import {colors} from 'lib/styles'
 
+export const BOTTOM_BAR_HEIGHT = 61
+
 export const styles = StyleSheet.create({
   bottomBar: {
+    height: BOTTOM_BAR_HEIGHT,
     position: 'absolute',
     bottom: 0,
     left: 0,