about summary refs log tree commit diff
path: root/src/alf/util/useGutterStyles.ts
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-12-10 14:52:30 -0600
committerGitHub <noreply@github.com>2024-12-10 20:52:30 +0000
commite052f5e198603246cb031e00d9cadc2ae4bb140d (patch)
treeaceffa2b71bfdc9c632ff8eaa84d68c807fd5655 /src/alf/util/useGutterStyles.ts
parentf34e8d8cdfcab16165c94d8c96084e9cd4338d91 (diff)
downloadvoidsky-e052f5e198603246cb031e00d9cadc2ae4bb140d.tar.zst
Refactor sidebar (#6971)
* Refactor RightNav

(cherry picked from commit 96bb02acfd2d7452df18a0e7410e6a7169a583ed)

* Better gutter handling

* Clean up styles

* Memoize breakpoints

* Format

* Comment

* Loosen spacing, handle overflow, smaller text to match prod

* Fix circular imports on native

* Return 0 instead of undefined for easier calculations

* Re-assign

* Fix

* Port over fix from subs/base

* Space out right nav feeds, widen sidebar to match prod

* Fix lost padding on home header

* Fix perf by not actually linking to new URL

* Remove underline on focus

* Foramt

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'src/alf/util/useGutterStyles.ts')
-rw-r--r--src/alf/util/useGutterStyles.ts21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/alf/util/useGutterStyles.ts b/src/alf/util/useGutterStyles.ts
deleted file mode 100644
index 64b246fdd..000000000
--- a/src/alf/util/useGutterStyles.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from 'react'
-
-import {atoms as a, useBreakpoints, ViewStyleProp} from '#/alf'
-
-export function useGutterStyles({
-  top,
-  bottom,
-}: {
-  top?: boolean
-  bottom?: boolean
-} = {}) {
-  const {gtMobile} = useBreakpoints()
-  return React.useMemo<ViewStyleProp['style']>(() => {
-    return [
-      a.px_lg,
-      top && a.pt_md,
-      bottom && a.pb_md,
-      gtMobile && [a.px_xl, top && a.pt_lg, bottom && a.pb_lg],
-    ]
-  }, [gtMobile, top, bottom])
-}