Merge pull request #1289 from omnivore-app/fix/highlight-pos
Better naming, fix issue with highlight bar placement
This commit is contained in:
@ -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 ? (
|
||||
|
||||
@ -536,7 +536,7 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
|
||||
isNewHighlight={!!selectionData}
|
||||
handleButtonClick={handleAction}
|
||||
isSharedToFeed={focusedHighlight?.sharedAt != undefined}
|
||||
displayNearCursor={isTouchScreenDevice()}
|
||||
displayAtBottom={isTouchScreenDevice()}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user