1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 13:18:26 -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;
cursor: pointer;
}
.success {
.button.success {
color: var(--success) !important;
}

View File

@ -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}

View File

@ -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,

View File

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

View File

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

View File

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