2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Improved "Copy link" design (#18486)

refs https://github.com/TryGhost/Product/issues/3974
This commit is contained in:
Djordje Vlaisavljevic 2023-10-04 19:16:08 +01:00 committed by GitHub
parent cbd43d38a8
commit 27cec8b909
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ const Tooltip: React.FC<TooltipProps> = ({content, size = 'sm', children, contai
);
tooltipClassName = clsx(
'absolute -mt-1 -translate-y-full whitespace-nowrap rounded-sm bg-black px-2 py-0.5 text-white opacity-0 transition-all group-hover/tooltip:opacity-100 dark:bg-grey-950',
'absolute -mt-1 -translate-y-full whitespace-nowrap rounded-sm bg-black px-2 py-0.5 leading-normal text-white opacity-0 transition-all group-hover/tooltip:opacity-100 dark:bg-grey-950',
size === 'sm' && 'text-xs',
size === 'md' && 'text-sm',
origin === 'center' && 'left-1/2 -translate-x-1/2',

View file

@ -84,7 +84,7 @@ const RecommendationList: React.FC<RecommendationListProps> = ({recommendations,
if (isLoading || recommendations.length) {
return <Table
hint={<span className='flex items-center gap-1'>Shared with new members after signup, or anytime using <Link href={recommendationsURL} target='_blank'>this link</Link><Tooltip content={copied ? 'Copied' : 'Copy link'} size='sm'><Button color='clear' hideLabel={true} icon={copied ? 'check-circle' : 'duplicate'} iconColorClass={copied ? 'text-green' : 'text-grey-600 hover:opacity-80'} label={copied ? 'Copied' : 'Copy'} size='sm' unstyled={true} onClick={copyRecommendationsUrl} /></Tooltip></span>}
hint={<span className='flex items-center gap-1'>Shared with new members after signup, or anytime using <Link href={recommendationsURL} target='_blank'>this link</Link><Tooltip containerClassName='leading-none' content={copied ? 'Copied' : 'Copy link'} size='sm'><Button color='clear' hideLabel={true} icon={copied ? 'check-circle' : 'duplicate'} iconColorClass={copied ? 'text-green w-[14px] h-[14px]' : 'text-grey-600 hover:opacity-80 w-[14px] h-[14px]'} label={copied ? 'Copied' : 'Copy'} unstyled={true} onClick={copyRecommendationsUrl} /></Tooltip></span>}
isLoading={isLoading}
pagination={pagination}
showMore={showMore}