mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-04-17 09:28:43 -04:00
fix custom image width/height when passed in as strings
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
.copy {
|
||||
.button {
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.success {
|
||||
.button.success {
|
||||
color: var(--success) !important;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ const CopyButton = forwardRef(function CopyButton(
|
||||
|
||||
return (
|
||||
<button
|
||||
className={cx({ copy: true, success: !!copied }, className)}
|
||||
className={cx({ button: true, success: !!copied }, className)}
|
||||
title="Copy to clipboard"
|
||||
aria-label="Copy to clipboard"
|
||||
onClick={handleCopy}
|
||||
|
||||
@@ -17,8 +17,8 @@ const CustomImage = ({
|
||||
}: NextImageProps) => {
|
||||
// passed directly into next/image: https://nextjs.org/docs/api-reference/next/image
|
||||
const imageProps: Partial<NextImageProps> = {
|
||||
width,
|
||||
height,
|
||||
width: typeof width === "string" ? parseInt(width) : width,
|
||||
height: typeof height === "string" ? parseInt(height) : height,
|
||||
layout: "intrinsic",
|
||||
alt: alt || "",
|
||||
quality: quality || 65,
|
||||
|
||||
Reference in New Issue
Block a user