Standardize photo entity icons
This commit is contained in:
parent
3fad8bae90
commit
13b6163212
@ -15,7 +15,6 @@ export default function AdminRecipeBadge({
|
|||||||
const renderBadgeContent = () =>
|
const renderBadgeContent = () =>
|
||||||
<div className={clsx(
|
<div className={clsx(
|
||||||
'inline-flex items-center gap-2',
|
'inline-flex items-center gap-2',
|
||||||
'translate-y-[1.5px]',
|
|
||||||
)}>
|
)}>
|
||||||
<PhotoRecipe {...{ recipe }} />
|
<PhotoRecipe {...{ recipe }} />
|
||||||
<div className="text-dim uppercase">
|
<div className="text-dim uppercase">
|
||||||
@ -32,4 +31,4 @@ export default function AdminRecipeBadge({
|
|||||||
? renderBadgeContent()
|
? renderBadgeContent()
|
||||||
: <Badge className="py-[3px]!">{renderBadgeContent()}</Badge>
|
: <Badge className="py-[3px]!">{renderBadgeContent()}</Badge>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ export default function PhotoCamera({
|
|||||||
/>
|
/>
|
||||||
: <TbCamera
|
: <TbCamera
|
||||||
size={15}
|
size={15}
|
||||||
className="translate-x-[-0.5px] translate-y-[1px]"
|
className="translate-x-[-0.5px]"
|
||||||
/>}
|
/>}
|
||||||
type={type}
|
type={type}
|
||||||
className={className}
|
className={className}
|
||||||
|
|||||||
@ -29,6 +29,7 @@ export default function EntityLink({
|
|||||||
hoverEntity,
|
hoverEntity,
|
||||||
truncate = true,
|
truncate = true,
|
||||||
className,
|
className,
|
||||||
|
classNameIcon,
|
||||||
debug,
|
debug,
|
||||||
}: {
|
}: {
|
||||||
icon: ReactNode
|
icon: ReactNode
|
||||||
@ -41,6 +42,7 @@ export default function EntityLink({
|
|||||||
hoverEntity?: ReactNode
|
hoverEntity?: ReactNode
|
||||||
truncate?: boolean
|
truncate?: boolean
|
||||||
className?: string
|
className?: string
|
||||||
|
classNameIcon?: string
|
||||||
debug?: boolean
|
debug?: boolean
|
||||||
} & EntityLinkExternalProps) {
|
} & EntityLinkExternalProps) {
|
||||||
const classForContrast = () => {
|
const classForContrast = () => {
|
||||||
@ -85,6 +87,7 @@ export default function EntityLink({
|
|||||||
className: clsx(
|
className: clsx(
|
||||||
classForContrast(),
|
classForContrast(),
|
||||||
href && !badged && 'hover:text-gray-900 dark:hover:text-gray-100',
|
href && !badged && 'hover:text-gray-900 dark:hover:text-gray-100',
|
||||||
|
classNameIcon,
|
||||||
),
|
),
|
||||||
debug,
|
debug,
|
||||||
}}>
|
}}>
|
||||||
|
|||||||
@ -19,7 +19,7 @@ export default function Icon({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<span className={clsx(
|
<span className={clsx(
|
||||||
'h-[18px]',
|
'h-[1rem] *:translate-y-[2.5px]',
|
||||||
wide ? 'w-[28px]' : 'w-[14px]',
|
wide ? 'w-[28px]' : 'w-[14px]',
|
||||||
'inline-flex items-center justify-center',
|
'inline-flex items-center justify-center',
|
||||||
debug && 'bg-gray-300 dark:bg-gray-700',
|
debug && 'bg-gray-300 dark:bg-gray-700',
|
||||||
|
|||||||
@ -11,7 +11,8 @@ export type LabeledIconType =
|
|||||||
export default function LabeledIcon({
|
export default function LabeledIcon({
|
||||||
icon,
|
icon,
|
||||||
type = 'icon-first',
|
type = 'icon-first',
|
||||||
className: classNameProp,
|
className,
|
||||||
|
classNameIcon,
|
||||||
children,
|
children,
|
||||||
iconWide,
|
iconWide,
|
||||||
debug,
|
debug,
|
||||||
@ -19,6 +20,7 @@ export default function LabeledIcon({
|
|||||||
icon?: ReactNode,
|
icon?: ReactNode,
|
||||||
type?: LabeledIconType,
|
type?: LabeledIconType,
|
||||||
className?: string,
|
className?: string,
|
||||||
|
classNameIcon?: string,
|
||||||
children: ReactNode,
|
children: ReactNode,
|
||||||
iconWide?:boolean,
|
iconWide?:boolean,
|
||||||
debug?: boolean,
|
debug?: boolean,
|
||||||
@ -26,12 +28,15 @@ export default function LabeledIcon({
|
|||||||
return (
|
return (
|
||||||
<span className={ clsx(
|
<span className={ clsx(
|
||||||
'inline-flex gap-x-1.5 md:gap-x-2 min-w-0',
|
'inline-flex gap-x-1.5 md:gap-x-2 min-w-0',
|
||||||
classNameProp,
|
className,
|
||||||
debug && 'border border-green-500 m-[-1px]',
|
debug && 'border border-green-500 m-[-1px]',
|
||||||
)}>
|
)}>
|
||||||
{icon && type !== 'text-only' &&
|
{icon && type !== 'text-only' &&
|
||||||
<Icon {...{
|
<Icon {...{
|
||||||
className: clsx(type === 'icon-last' && 'order-1'),
|
className: clsx(
|
||||||
|
type === 'icon-last' && 'order-1',
|
||||||
|
classNameIcon,
|
||||||
|
),
|
||||||
wide: iconWide,
|
wide: iconWide,
|
||||||
debug,
|
debug,
|
||||||
}}>
|
}}>
|
||||||
|
|||||||
@ -22,7 +22,9 @@ export default function PhotoLens({
|
|||||||
<EntityLink
|
<EntityLink
|
||||||
label={formatLensText(lens)}
|
label={formatLensText(lens)}
|
||||||
href={pathForLens(lens)}
|
href={pathForLens(lens)}
|
||||||
icon={<TbCone className="rotate-[270deg] translate-x-[-1px]" />}
|
icon={<TbCone
|
||||||
|
className="rotate-[270deg] translate-x-[-0.5px]"
|
||||||
|
/>}
|
||||||
type={type}
|
type={type}
|
||||||
className={className}
|
className={className}
|
||||||
badged={badged}
|
badged={badged}
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export default function PhotoRecipe({
|
|||||||
className={clsx(
|
className={clsx(
|
||||||
badged
|
badged
|
||||||
? 'translate-x-[-1px] translate-y-[0.5px]'
|
? 'translate-x-[-1px] translate-y-[0.5px]'
|
||||||
: 'translate-y-[0.5px]',
|
: 'translate-y-[-0.5px]',
|
||||||
)}
|
)}
|
||||||
/>}
|
/>}
|
||||||
className={className}
|
className={className}
|
||||||
|
|||||||
@ -30,7 +30,12 @@ export default function PhotoFilmSimulation({
|
|||||||
href={pathForFilmSimulation(simulation)}
|
href={pathForFilmSimulation(simulation)}
|
||||||
icon={<PhotoFilmSimulationIcon
|
icon={<PhotoFilmSimulationIcon
|
||||||
simulation={simulation}
|
simulation={simulation}
|
||||||
className={clsx(contrast === 'frosted' && 'text-black')}
|
className={clsx(
|
||||||
|
contrast === 'frosted' && 'text-black',
|
||||||
|
type === 'icon-only'
|
||||||
|
? 'translate-y-[-2.5px]'
|
||||||
|
: 'translate-y-[-1px]',
|
||||||
|
)}
|
||||||
/>}
|
/>}
|
||||||
title={`Film Simulation: ${large}`}
|
title={`Film Simulation: ${large}`}
|
||||||
type={type}
|
type={type}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { pathForTag } from '@/app/paths';
|
import { pathForTag } from '@/app/paths';
|
||||||
import { FaTag } from 'react-icons/fa';
|
|
||||||
import { formatTag } from '.';
|
import { formatTag } from '.';
|
||||||
import EntityLink, {
|
import EntityLink, {
|
||||||
EntityLinkExternalProps,
|
EntityLinkExternalProps,
|
||||||
} from '@/components/primitives/EntityLink';
|
} from '@/components/primitives/EntityLink';
|
||||||
|
import { FiTag } from 'react-icons/fi';
|
||||||
|
|
||||||
export default function PhotoTag({
|
export default function PhotoTag({
|
||||||
tag,
|
tag,
|
||||||
@ -21,10 +21,7 @@ export default function PhotoTag({
|
|||||||
<EntityLink
|
<EntityLink
|
||||||
label={formatTag(tag)}
|
label={formatTag(tag)}
|
||||||
href={pathForTag(tag)}
|
href={pathForTag(tag)}
|
||||||
icon={<FaTag
|
icon={<FiTag size={14} className="translate-x-[0.5px]" />}
|
||||||
size={11}
|
|
||||||
className="translate-y-[0.5px]"
|
|
||||||
/>}
|
|
||||||
type={type}
|
type={type}
|
||||||
className={className}
|
className={className}
|
||||||
badged={badged}
|
badged={badged}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user