From e052f5e198603246cb031e00d9cadc2ae4bb140d Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 10 Dec 2024 14:52:30 -0600 Subject: 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 --- src/components/Layout/Header/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components/Layout/Header') diff --git a/src/components/Layout/Header/index.tsx b/src/components/Layout/Header/index.tsx index a35a09537..321f7201f 100644 --- a/src/components/Layout/Header/index.tsx +++ b/src/components/Layout/Header/index.tsx @@ -13,7 +13,7 @@ import { platform, TextStyleProp, useBreakpoints, - useGutterStyles, + useGutters, useTheme, } from '#/alf' import {Button, ButtonIcon, ButtonProps} from '#/components/Button' @@ -34,7 +34,7 @@ export function Outer({ noBottomBorder?: boolean }) { const t = useTheme() - const gutter = useGutterStyles() + const gutters = useGutters([0, 'base']) const {gtMobile} = useBreakpoints() const {isWithinOffsetView} = useContext(ScrollbarOffsetContext) @@ -46,7 +46,7 @@ export function Outer({ a.flex_row, a.align_center, a.gap_sm, - gutter, + gutters, platform({ native: [a.pb_sm, a.pt_xs], web: [a.py_sm], -- cgit 1.4.1