Handle <EntityLink /> overflow

This commit is contained in:
Sam Becker 2023-12-16 11:46:19 -06:00
parent 825503d926
commit 767d6acb1e
3 changed files with 9 additions and 5 deletions

View File

@ -3,10 +3,11 @@ import { pathForCamera } from '@/site/paths';
import { IoMdCamera } from 'react-icons/io';
import { Camera } from '.';
import EntityLink, { EntityLinkExternalProps } from '@/components/EntityLink';
import { cc } from '@/utility/css';
export default function PhotoCamera({
camera,
hideAppleIcon = true,
hideAppleIcon,
type = 'icon-first',
badged,
dim,
@ -29,14 +30,17 @@ export default function PhotoCamera({
icon={showAppleIcon
? <AiFillApple
title="Apple"
className="text-icon translate-y-[-0.5px]"
className={cc(
'text-icon',
'translate-x-[-2.5px] translate-y-[-2px]',
)}
size={14}
/>
: <IoMdCamera
size={13}
className="text-icon translate-y-[-0.25px]"
/>}
type={type}
type={showAppleIcon && isCameraApple ? 'icon-first' : type}
badged={badged}
dim={dim}
hoverEntity={countOnHover}

View File

@ -42,7 +42,7 @@ export default function EntityLink({
href={href}
title={title}
className={cc(
'inline-flex items-center gap-1',
'inline-flex gap-1',
!badged && 'text-main hover:text-gray-900 dark:hover:text-gray-100',
dim && 'text-dim',
)}
@ -61,6 +61,7 @@ export default function EntityLink({
{icon && type !== 'text-only' &&
<span className={cc(
'text-dim inline-flex min-w-[1rem]',
'translate-y-[4px]',
type === 'icon-first' && 'order-first',
)}>
{icon}

View File

@ -84,7 +84,6 @@ export default function PhotoLarge({
<PhotoCamera
camera={camera}
type="text-only"
hideAppleIcon={false}
/>
{showSimulation && photo.filmSimulation &&
<div className="translate-x-[-0.3rem]">