Fix copy button alignment

This commit is contained in:
Sam Becker 2025-02-15 22:50:10 -06:00
parent af40abeb97
commit 3afafb47a4
4 changed files with 12 additions and 7 deletions

View File

@ -215,7 +215,7 @@ export default function AdminAppInsightsClient({
/>}
content="Speed up page load times"
expandContent={<>
Dramatically improve load times by enabling static optimization
Improve load times by enabling static optimization
{' '}
on:
<div className="flex flex-col gap-y-4 mt-3">
@ -236,7 +236,7 @@ export default function AdminAppInsightsClient({
'NEXT_PUBLIC_STATICALLY_OPTIMIZE_PHOTO_CATEGORY_OG_IMAGES',
)}
<span>
See {readmeAnchor('performance')} for cost considerations.
See {readmeAnchor('performance')} for cost implications.
</span>
</div>
</>}

View File

@ -30,9 +30,7 @@ export default function SecretGenerator() {
'flex flex-nowrap items-center gap-2 leading-none -mx-1',
)}>
{secret ? <span>{secret}</span> : <Spinner />}
<div
className="flex items-center gap-0.5 translate-y-[-2px]"
>
<div className="flex items-center gap-0.5 translate-y-[-0.5px]">
<CopyButton label="Secret" text={secret} />
</div>
</div>

View File

@ -7,17 +7,19 @@ export default function CopyButton({
label,
text,
subtle,
className,
}: {
label: string
text?: string,
subtle?: boolean
className?: string
}) {
return (
<LoaderButton
icon={<BiCopy size={15} />}
className={clsx(
'translate-y-[2px]',
subtle && 'text-gray-300 dark:text-gray-700',
className,
)}
onClick={text
? () => {

View File

@ -28,7 +28,12 @@ export default function EnvVar({
{variable}{value && ` = ${value}`}
</span>
{includeCopyButton &&
<CopyButton label={variable} text={variable} subtle />}
<CopyButton
className="translate-y-[0.5px]"
label={variable}
text={variable}
subtle
/>}
</span>
</div>
);