From b3733a4ee67337789f5917f464bda06066979548 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Fri, 7 Oct 2022 18:08:32 +0800 Subject: [PATCH] Better naming, fix issue with highlight bar placement --- packages/web/components/patterns/HighlightBar.tsx | 6 +++--- .../web/components/templates/article/HighlightsLayer.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/web/components/patterns/HighlightBar.tsx b/packages/web/components/patterns/HighlightBar.tsx index f1129e089..cce7f9421 100644 --- a/packages/web/components/patterns/HighlightBar.tsx +++ b/packages/web/components/patterns/HighlightBar.tsx @@ -27,12 +27,12 @@ type HighlightBarProps = { anchorCoordinates: PageCoordinates isNewHighlight: boolean isSharedToFeed: boolean - displayNearCursor: boolean + displayAtBottom: boolean handleButtonClick: (action: HighlightAction) => void } export function HighlightBar(props: HighlightBarProps): JSX.Element { - if (!props.displayNearCursor) { + if (props.displayAtBottom) { return ( {props.isNewHighlight ? ( diff --git a/packages/web/components/templates/article/HighlightsLayer.tsx b/packages/web/components/templates/article/HighlightsLayer.tsx index f36476140..9d58ec9e5 100644 --- a/packages/web/components/templates/article/HighlightsLayer.tsx +++ b/packages/web/components/templates/article/HighlightsLayer.tsx @@ -536,7 +536,7 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element { isNewHighlight={!!selectionData} handleButtonClick={handleAction} isSharedToFeed={focusedHighlight?.sharedAt != undefined} - displayNearCursor={isTouchScreenDevice()} + displayAtBottom={isTouchScreenDevice()} /> )