1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 03:58:28 -04:00

fix custom image width/height when passed in as strings

This commit is contained in:
Jake Jarvis 2022-01-24 11:37:12 -05:00
parent e5b862508c
commit e91595c8bf
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
6 changed files with 8 additions and 8 deletions

View File

@ -1,8 +1,8 @@
.copy { .button {
line-height: 1; line-height: 1;
cursor: pointer; cursor: pointer;
} }
.success { .button.success {
color: var(--success) !important; color: var(--success) !important;
} }

View File

@ -47,7 +47,7 @@ const CopyButton = forwardRef(function CopyButton(
return ( return (
<button <button
className={cx({ copy: true, success: !!copied }, className)} className={cx({ button: true, success: !!copied }, className)}
title="Copy to clipboard" title="Copy to clipboard"
aria-label="Copy to clipboard" aria-label="Copy to clipboard"
onClick={handleCopy} onClick={handleCopy}

View File

@ -17,8 +17,8 @@ const CustomImage = ({
}: NextImageProps) => { }: NextImageProps) => {
// passed directly into next/image: https://nextjs.org/docs/api-reference/next/image // passed directly into next/image: https://nextjs.org/docs/api-reference/next/image
const imageProps: Partial<NextImageProps> = { const imageProps: Partial<NextImageProps> = {
width, width: typeof width === "string" ? parseInt(width) : width,
height, height: typeof height === "string" ? parseInt(height) : height,
layout: "intrinsic", layout: "intrinsic",
alt: alt || "", alt: alt || "",
quality: quality || 65, quality: quality || 65,

View File

@ -1,8 +1,8 @@
import { NextSeo } from "next-seo"; import { NextSeo } from "next-seo";
import Content from "../components/Content/Content";
import PageTitle from "../components/PageTitle/PageTitle"; import PageTitle from "../components/PageTitle/PageTitle";
import ContactForm from "../components/ContactForm/ContactForm"; import ContactForm from "../components/ContactForm/ContactForm";
import { MailIcon, LockIcon } from "../components/Icons"; import { MailIcon, LockIcon } from "../components/Icons";
import Content from "../components/Content/Content";
const Contact = () => ( const Contact = () => (
<> <>

View File

@ -1,5 +1,5 @@
import ColorfulLink from "../components/ColorfulLink/ColorfulLink";
import Content from "../components/Content/Content"; import Content from "../components/Content/Content";
import ColorfulLink from "../components/ColorfulLink/ColorfulLink";
import { WaveIcon, LockIcon } from "../components/Icons"; import { WaveIcon, LockIcon } from "../components/Icons";
const Index = () => ( const Index = () => (

View File

@ -1,11 +1,11 @@
import { graphql } from "@octokit/graphql"; import { graphql } from "@octokit/graphql";
import { NextSeo } from "next-seo"; import { NextSeo } from "next-seo";
import Content from "../components/Content/Content";
import PageTitle from "../components/PageTitle/PageTitle"; import PageTitle from "../components/PageTitle/PageTitle";
import RepositoryCard from "../components/RepositoryCard/RepositoryCard"; import RepositoryCard from "../components/RepositoryCard/RepositoryCard";
import { ProjectsIcon } from "../components/Icons"; import { ProjectsIcon } from "../components/Icons";
import type { GetStaticProps } from "next"; import type { GetStaticProps } from "next";
import { RepoType } from "../types"; import { RepoType } from "../types";
import Content from "../components/Content/Content";
type Props = { type Props = {
repos: RepoType[]; repos: RepoType[];