1
Fork 0

Fix position of fullscreen arrows (fixes #594)

This commit is contained in:
viktorstrate 2022-02-07 18:05:54 +01:00
parent f27a1924b4
commit d235a7e352
No known key found for this signature in database
GPG Key ID: 3F855605109C1E8A
1 changed files with 6 additions and 5 deletions

View File

@ -50,15 +50,16 @@ const ExitButton = styled(OverlayButton)`
top: 28px; top: 28px;
` `
const NavigationButton = styled(OverlayButton)<{ float: 'left' | 'right' }>` const NavigationButton = styled(OverlayButton)<{ align: 'left' | 'right' }>`
height: 80%; height: 80%;
width: 20%; width: 20%;
top: 10%; top: 10%;
${({ float }) => (float == 'left' ? 'left: 0;' : null)} ${({ align: float }) => (float == 'left' ? 'left: 0;' : null)}
${({ float }) => (float == 'right' ? 'right: 0;' : null)} ${({ align: float }) => (float == 'right' ? 'right: 0;' : null)}
& svg { & svg {
margin: auto;
width: 48px; width: 48px;
height: 64px; height: 64px;
} }
@ -103,7 +104,7 @@ const PresentNavigationOverlay = ({
<NavigationButton <NavigationButton
aria-label="Previous image" aria-label="Previous image"
className={hide ? 'hide' : undefined} className={hide ? 'hide' : undefined}
float="left" align="left"
onClick={() => dispatchMedia({ type: 'previousImage' })} onClick={() => dispatchMedia({ type: 'previousImage' })}
> >
<PrevIcon /> <PrevIcon />
@ -111,7 +112,7 @@ const PresentNavigationOverlay = ({
<NavigationButton <NavigationButton
aria-label="Next image" aria-label="Next image"
className={hide ? 'hide' : undefined} className={hide ? 'hide' : undefined}
float="right" align="right"
onClick={() => dispatchMedia({ type: 'nextImage' })} onClick={() => dispatchMedia({ type: 'nextImage' })}
> >
<NextIcon /> <NextIcon />