Merge pull request #1289 from omnivore-app/fix/highlight-pos

Better naming, fix issue with highlight bar placement
This commit is contained in:
Jackson Harper
2022-10-07 18:29:38 +08:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@ -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 (
<Box
css={{
@ -93,7 +93,7 @@ function BarContent(props: HighlightBarProps): JSX.Element {
css={{
height: '100%',
alignItems: 'center',
width: props.displayNearCursor ? 'auto' : '100%',
width: props.displayAtBottom ? '100%' : 'auto',
}}
>
{props.isNewHighlight ? (

View File

@ -536,7 +536,7 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
isNewHighlight={!!selectionData}
handleButtonClick={handleAction}
isSharedToFeed={focusedHighlight?.sharedAt != undefined}
displayNearCursor={isTouchScreenDevice()}
displayAtBottom={isTouchScreenDevice()}
/>
</>
)