Update zoom icon
This commit is contained in:
parent
11bd05481f
commit
3779bc141c
@ -30,6 +30,7 @@ export default function DownloadButton({
|
|||||||
downloadFileFromBrowser(photo.url, downloadFileNameForPhoto(photo))
|
downloadFileFromBrowser(photo.url, downloadFileNameForPhoto(photo))
|
||||||
.finally(() => setIsLoading(false));
|
.finally(() => setIsLoading(false));
|
||||||
}}
|
}}
|
||||||
|
hideFocusOutline
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ export default function LoaderButton(props: {
|
|||||||
confirmText?: string
|
confirmText?: string
|
||||||
shouldPreventDefault?: boolean
|
shouldPreventDefault?: boolean
|
||||||
primary?: boolean
|
primary?: boolean
|
||||||
|
hideFocusOutline?: boolean
|
||||||
} & ButtonHTMLAttributes<HTMLButtonElement>) {
|
} & ButtonHTMLAttributes<HTMLButtonElement>) {
|
||||||
const {
|
const {
|
||||||
children,
|
children,
|
||||||
@ -24,6 +25,7 @@ export default function LoaderButton(props: {
|
|||||||
confirmText,
|
confirmText,
|
||||||
shouldPreventDefault,
|
shouldPreventDefault,
|
||||||
primary,
|
primary,
|
||||||
|
hideFocusOutline,
|
||||||
type = 'button',
|
type = 'button',
|
||||||
onClick,
|
onClick,
|
||||||
disabled,
|
disabled,
|
||||||
@ -53,6 +55,7 @@ export default function LoaderButton(props: {
|
|||||||
styleAs === 'link-without-hover' && 'hover:text-main',
|
styleAs === 'link-without-hover' && 'hover:text-main',
|
||||||
'inline-flex items-center gap-2 self-start whitespace-nowrap',
|
'inline-flex items-center gap-2 self-start whitespace-nowrap',
|
||||||
primary && 'primary',
|
primary && 'primary',
|
||||||
|
hideFocusOutline && 'focus:outline-none',
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
disabled={isLoading || disabled}
|
disabled={isLoading || disabled}
|
||||||
|
|||||||
@ -37,7 +37,7 @@ import useOnVisible from '@/utility/useOnVisible';
|
|||||||
import PhotoDate from './PhotoDate';
|
import PhotoDate from './PhotoDate';
|
||||||
import { useAppState } from '@/state/AppState';
|
import { useAppState } from '@/state/AppState';
|
||||||
import useImageZoomControls from '@/components/image/useImageZoomControls';
|
import useImageZoomControls from '@/components/image/useImageZoomControls';
|
||||||
import { LuZoomIn } from 'react-icons/lu';
|
import { LuExpand } from 'react-icons/lu';
|
||||||
import LoaderButton from '@/components/primitives/LoaderButton';
|
import LoaderButton from '@/components/primitives/LoaderButton';
|
||||||
|
|
||||||
export default function PhotoLarge({
|
export default function PhotoLarge({
|
||||||
@ -301,6 +301,15 @@ export default function PhotoLarge({
|
|||||||
? 'translate-x-[-2.5px]'
|
? 'translate-x-[-2.5px]'
|
||||||
: 'md:translate-x-[-2.5px]',
|
: 'md:translate-x-[-2.5px]',
|
||||||
)}>
|
)}>
|
||||||
|
{showZoomControls &&
|
||||||
|
<LoaderButton
|
||||||
|
title="Open Image Viewer"
|
||||||
|
icon={<LuExpand size={15} />}
|
||||||
|
onClick={open}
|
||||||
|
styleAs="link"
|
||||||
|
className="text-medium translate-y-[0.25px]"
|
||||||
|
hideFocusOutline
|
||||||
|
/>}
|
||||||
{shouldShare &&
|
{shouldShare &&
|
||||||
<ShareButton
|
<ShareButton
|
||||||
title="Share Photo"
|
title="Share Photo"
|
||||||
@ -313,14 +322,6 @@ export default function PhotoLarge({
|
|||||||
focal={shouldShareFocalLength ? photo.focalLength : undefined}
|
focal={shouldShareFocalLength ? photo.focalLength : undefined}
|
||||||
prefetch={prefetchRelatedLinks}
|
prefetch={prefetchRelatedLinks}
|
||||||
/>}
|
/>}
|
||||||
{showZoomControls &&
|
|
||||||
<LoaderButton
|
|
||||||
title="Open Image Viewer"
|
|
||||||
icon={<LuZoomIn size={17} />}
|
|
||||||
onClick={open}
|
|
||||||
styleAs="link"
|
|
||||||
className="text-medium"
|
|
||||||
/>}
|
|
||||||
{ALLOW_PUBLIC_DOWNLOADS &&
|
{ALLOW_PUBLIC_DOWNLOADS &&
|
||||||
<DownloadButton
|
<DownloadButton
|
||||||
className={clsx(
|
className={clsx(
|
||||||
|
|||||||
@ -46,6 +46,7 @@ export default function ShareButton({
|
|||||||
icon={<TbPhotoShare size={16} />}
|
icon={<TbPhotoShare size={16} />}
|
||||||
spinnerColor="dim"
|
spinnerColor="dim"
|
||||||
styleAs="link"
|
styleAs="link"
|
||||||
|
hideFocusOutline
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user